Fix a warning in cgroup_add_value_string() where '%d' was
being passed to fprintf when it should have been using '%ld'.
wrapper.c: In function ‘cgroup_add_value_string’:
wrapper.c:207:51: warning: format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘long unsigned int’ [-Wformat=]
207 | fprintf(stderr, "value exceeds the maximum of %d
characters\n",
| ~^
| |
| int
| %ld
208 | sizeof(cntl_value->value) - 1);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
if (value) {
if (strlen(value) >= sizeof(cntl_value->value)) {
- fprintf(stderr, "value exceeds the maximum of %d characters\n",
+ fprintf(stderr, "value exceeds the maximum of %ld characters\n",
sizeof(cntl_value->value) - 1);
free(cntl_value);
return ECGCONFIGPARSEFAIL;