wireless plugin: fix implicit conversion warning
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 31 May 2018 14:08:55 +0000 (16:08 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 31 May 2018 14:08:55 +0000 (16:08 +0200)
  CC       src/wireless.lo
src/wireless.c:106:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
    len = strlen(fields[0]) - 1;
        ~ ~~~~~~~~~~~~~~~~~~^~~
1 warning generated.

src/wireless.c

index 31aba0a..2e597f3 100644 (file)
@@ -86,7 +86,7 @@ static int wireless_read(void) {
   int numfields;
 
   int devices_found;
-  int len;
+  size_t len;
 
   /* there are a variety of names for the wireless device */
   if ((fh = fopen(WIRELESS_PROC_FILE, "r")) == NULL) {