]> sigrok.org Git - libsigrok.git/commitdiff
mooshimeter-dmm: silence compiler warning (memset() prototypes)
authorGerhard Sittig <redacted>
Tue, 29 Oct 2019 16:48:31 +0000 (17:48 +0100)
committerGerhard Sittig <redacted>
Tue, 29 Oct 2019 16:50:07 +0000 (17:50 +0100)
The Mooshimeter driver uses mem*() and str*() library calls. Include the
<string.h> header file to silence compiler warnings.

  ...
  ./src/hardware/mooshimeter-dmm/protocol.c: In function 'lookup_tree_path':
  ./src/hardware/mooshimeter-dmm/protocol.c:275:3: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration]
     end = strchr(path, ':');
     ^
  ./src/hardware/mooshimeter-dmm/protocol.c:275:9: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default]
     end = strchr(path, ':');
           ^
  ...

src/hardware/mooshimeter-dmm/protocol.c

index 38fd3fcc52f3d86c9578ff0310647644a4ad19e9..15aa8f56a774cbc95086b3d406e5946db02ea6a8 100644 (file)
@@ -20,6 +20,7 @@
 #include <config.h>
 #include <gio/gio.h>
 #include <math.h>
+#include <string.h>
 #include "protocol.h"
 
 /*