Code

Use gcc-specific __attribute__ to mark unused parameter
[collectd.git] / src / utils_cmd_getval.c
index 186ef9b56d60b6385fde3336316bc0462008c474..ce3e28e003eafc8f671dde5acab5462a5c57847f 100644 (file)
@@ -51,7 +51,7 @@ int handle_getval (FILE *fh, char *buffer)
   const data_set_t *ds;
 
   int   status;
-  int   i;
+  size_t i;
 
   if ((fh == NULL) || (buffer == NULL))
     return (-1);
@@ -123,7 +123,7 @@ int handle_getval (FILE *fh, char *buffer)
     return (-1);
   }
 
-  if (ds->ds_num != values_num)
+  if ((size_t) ds->ds_num != values_num)
   {
     ERROR ("ds[%s]->ds_num = %i, "
        "but uc_get_rate_by_name returned %u values.",