Skip to contentSkip to conversation

Fix -Wall warnings in udev 054 (volume_id)

PATCH Applied Tobias Klauser 2 participants 2 messages Mar 10, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Fix -Wall warnings in udev 054 (volume_id)

Hi,

The following patch fixes some warnings when compiling volume_id from udev with the -Wall compiler flag. Define _GNU_SOURCE for strnlen() and correct the path to logging.h

Thanks, Tobias

extras/volume_id/udev_volume_id.c +2 -0
diff -urpN udev-054.orig/extras/volume_id/udev_volume_id.c udev-054/extras/volume_id/udev_volume_id.c
@@ -21,6 +21,8 @@
  *
  */
 
+#define _GNU_SOURCE
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
extras/volume_id/volume_id/logging.h +1 -1
diff -urpN udev-054.orig/extras/volume_id/volume_id/logging.h udev-054/extras/volume_id/volume_id/logging.h
@@ -16,6 +16,6 @@
 #endif
 
 /* just use the udev version */
-#include "../../logging.h"
+#include "../../../logging.h"
 
 #endif /* _VOLUME_ID_LOGGING_H_ */

-------------------------------------------------------
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

Applied
#1 lore raw
Quoted 26 lines · Tobias Klauser

Hi,

The following patch fixes some warnings when compiling volume_id from udev with the -Wall compiler flag. Define _GNU_SOURCE for strnlen() and correct the path to logging.h

Thanks, Tobias

diff -urpN udev-054.orig/extras/volume_id/udev_volume_id.c udev-054/extras/volume_id/udev_volume_id.c

extras/volume_id/udev_volume_id.c +2 -0
@@ -21,6 +21,8 @@
  *
  */
 
+#define _GNU_SOURCE
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>

diff -urpN udev-054.orig/extras/volume_id/volume_id/logging.h udev-054/extras/volume_id/volume_id/logging.h

extras/volume_id/volume_id/logging.h line 19

Quoted 5 lines
extras/volume_id/volume_id/logging.h +1 -1
@@ -16,6 +16,6 @@
 #endif
 
 /* just use the udev version */
-#include "../../logging.h"
+#include "../../../logging.h"

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