Fix -Wall warnings in udev 054 (chassis_id)
PATCH 3/4 Fix -Wall warnings in udev 054 (chassis_id)
Hi,
The following patch fixes a warning when compiling chassis_id from udev with the -Wall compiler flag. There are too much conversions in the format string of sscanf(). One %d can be dropped.
Thanks, Tobias
extras/chassis_id/table.c +1 -1
@@ -59,7 +59,7 @@ int table_init(void) i =0 ;while (!feof (fp)) {fgets (ptr,80 , fp); -sscanf (ptr,"%d %d %d %d %d %s %s" , &ptable[i].id, +sscanf (ptr,"%d %d %d %d %s %s" , &ptable[i].id, &ptable[i].num_disks, &ptable[i].chassis_num, &ptable[i].slot_num, ptable[i].serial_num, ptable[i].name);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Kay Sievers
AppliedQuoted 15 lines · Tobias Klauser
Hi,
The following patch fixes a warning when compiling
chassis_idfrom udev with the -Wall compiler flag. There are too much conversions in the format string ofsscanf(). One %d can be dropped.Thanks, Tobias
Signed-off-by Tobias Klauser <[email protected]>diff -urpN
udev-054.orig/extras/chassis_id/table.cudev-054/extras/chassis_id/table.c
extras/chassis_id/table.c int table_init(void) · line 65
Quoted 8 lines
extras/chassis_id/table.c +1
-1@@ -59,7 +59,7 @@ int table_init(void) i =0 ;while (!feof (fp)) {fgets (ptr,80 , fp); -sscanf (ptr,"%d %d %d %d %d %s %s" , &ptable[i].id, +sscanf (ptr,"%d %d %d %d %s %s" , &ptable[i].id, &ptable[i].num_disks, &ptable[i].chassis_num, &ptable[i].slot_num, ptable[i].serial_num, ptable[i].name);
Applied.
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel