projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df349a2
)
uuid plugin: fix implicit conversion warning
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Thu, 31 May 2018 14:51:34 +0000
(16:51 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Thu, 31 May 2018 14:51:34 +0000
(16:51 +0200)
CC src/uuid.lo
src/uuid.c:50:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(uuid);
~ ^~~~~~~~~~~~
1 warning generated.
src/uuid.c
patch
|
blob
|
history
diff --git
a/src/uuid.c
b/src/uuid.c
index
39b1fe6
..
c7878c7
100644
(file)
--- a/
src/uuid.c
+++ b/
src/uuid.c
@@
-42,13
+42,10
@@
static char *uuidfile;
static const char *config_keys[] = {"UUIDFile"};
static int looks_like_a_uuid(const char *uuid) {
- int len;
-
if (!uuid)
return 0;
- len = strlen(uuid);
-
+ size_t len = strlen(uuid);
if (len < UUID_PRINTABLE_COMPACT_LENGTH)
return 0;