mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Use misc_asprintf() for concatenating strings and get rid of the
following GCC8 compile warnings:
disk.c: In function ‘disk_get_info’:
disk.c:247:43: warning: ‘%d’ directive output may be truncated writing
between 1 and 11 bytes int o a region of size between 0 and 79
[-Wformat-truncation=]
snprintf(ppn_cmd, sizeof(ppn_cmd), "%s %d:%d",
^~
disk.c:247:39: note: using the range [-2147483648, 2147483647] for
directive argument
snprintf(ppn_cmd, sizeof(ppn_cmd), "%s %d:%d",
^~~~~~~~~~
disk.c:247:39: note: using the range [-2147483648, 2147483647] for
directive argument
disk.c:247:4: note: ‘snprintf’ output between 5 and 104 bytes into a
destination of size 80
snprintf(ppn_cmd, sizeof(ppn_cmd), "%s %d:%d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
script_file, major(stats.st_rdev),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
minor(stats.st_rdev));
~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>