sysfs: fix minor compile warning

Seen in Debian QA on mipsel.

util-sysfs.c: In function ‘SysFsWriteValue’:
util-sysfs.c:50:45: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
   50 |     snprintf(sentence, sizeof(sentence), "%ld", value);
      |                                           ~~^   ~~~~~
      |                                             |   |
      |                                             |   int64_t {aka long long int}
      |                                             long int
      |                                           %lld
pull/9288/head
Victor Julien 2 years ago
parent 1b08c561f6
commit b1535fe1f9

@ -47,7 +47,7 @@ TmEcode SysFsWriteValue(const char *path, int64_t value)
SCReturnInt(TM_ECODE_FAILED);
}
snprintf(sentence, sizeof(sentence), "%ld", value);
snprintf(sentence, sizeof(sentence), "%" PRIu64, value);
ssize_t len = strlen(sentence);
if (write(fd, sentence, len) != len) {

Loading…
Cancel
Save