Merge pull request #3100 from rubenk/virt-fix-compiler-warning
authorFlorian Forster <ff@octo.it>
Wed, 20 Feb 2019 10:43:16 +0000 (11:43 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Feb 2019 10:43:16 +0000 (11:43 +0100)
virt plugin: fix compiler warning

src/ovs_stats.c
src/turbostat.c

index fe1953f..da218b6 100644 (file)
@@ -860,7 +860,7 @@ static int ovs_stats_update_port(const char *uuid, yajl_val port) {
 
     // ifaces_list is [[ "uuid", "<some_uuid>" ], [ "uuid",
     // "<another_uuid>" ], ... ]]
-    for (int i = 0; i < YAJL_GET_ARRAY(ifaces_list)->len; i++) {
+    for (size_t i = 0; i < YAJL_GET_ARRAY(ifaces_list)->len; i++) {
       yajl_val iface_tuple = YAJL_GET_ARRAY(ifaces_list)->values[i];
 
       // iface_tuple is [ "uuid", "<some_uuid>" ]
index deb16e0..ce57942 100644 (file)
@@ -1463,7 +1463,7 @@ err:
   return ret;
 }
 
-int save_affinity(void) {
+static int save_affinity(void) {
   if (affinity_policy == policy_restore_affinity) {
     /* Try to save the scheduling affinity, as it will be modified by
      * get_counters().
@@ -1476,7 +1476,7 @@ int save_affinity(void) {
   return 0;
 }
 
-void restore_affinity(void) {
+static void restore_affinity(void) {
   /* Let's restore the affinity to the value saved in save_affinity */
   if (affinity_policy == policy_restore_affinity)
     (void)sched_setaffinity(0, cpu_saved_affinity_setsize,