[PATCH] fsck.cramfs, chrt, taskset, more: prevent gcc warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is a small patch to avoid various gcc warnings

Signed-off-by: Peter Breitenlohner <peb@xxxxxxxxxxxx>
	Prevent compiler warnings:
		"_GNU_SOURCE" redefined
		 discards qualifiers [compare curs_terminfo(3)]

diff -ur util-linux-ng-2.13.orig/disk-utils/fsck.cramfs.c util-linux-ng-2.13/disk-utils/fsck.cramfs.c
--- util-linux-ng-2.13.orig/disk-utils/fsck.cramfs.c	2007-04-25 14:43:38.000000000 +0200
+++ util-linux-ng-2.13/disk-utils/fsck.cramfs.c	2007-10-22 13:27:53.000000000 +0200
@@ -36,7 +36,10 @@
 /* compile-time options */
 //#define INCLUDE_FS_TESTS	/* include cramfs checking and extraction */
 
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+#  define _GNU_SOURCE
+#endif
+
 #include <stdio.h>
 #include <stdarg.h>
 #include <unistd.h>
diff -ur util-linux-ng-2.13.orig/schedutils/chrt.c util-linux-ng-2.13/schedutils/chrt.c
--- util-linux-ng-2.13.orig/schedutils/chrt.c	2007-08-13 12:39:47.000000000 +0200
+++ util-linux-ng-2.13/schedutils/chrt.c	2007-10-22 13:27:55.000000000 +0200
@@ -21,7 +21,9 @@
  * Copyright (C) 2004 Robert Love
  */
 
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+#  define _GNU_SOURCE
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
diff -ur util-linux-ng-2.13.orig/schedutils/taskset.c util-linux-ng-2.13/schedutils/taskset.c
--- util-linux-ng-2.13.orig/schedutils/taskset.c	2007-08-13 12:39:47.000000000 +0200
+++ util-linux-ng-2.13/schedutils/taskset.c	2007-10-22 13:27:56.000000000 +0200
@@ -26,7 +26,9 @@
  * Copyright (C) 2004 Robert Love
  */
 
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+#  define _GNU_SOURCE
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
diff -ur util-linux-ng-2.13.orig/text-utils/more.c util-linux-ng-2.13/text-utils/more.c
--- util-linux-ng-2.13.orig/text-utils/more.c	2007-08-27 15:00:34.000000000 +0200
+++ util-linux-ng-2.13/text-utils/more.c	2007-10-19 20:41:54.000000000 +0200
@@ -181,7 +181,7 @@
 }
 
 static void
-my_setupterm(const char *term, int fildes, int *errret) {
+my_setupterm(char *term, int fildes, int *errret) {
      setupterm(term, fildes, errret);
 }
 
@@ -201,7 +201,7 @@
 }
 
 static char *
-my_tgoto(const char *cap, int col, int row) {
+my_tgoto(char *cap, int col, int row) {
      return tparm(cap, col, row);
 }
 

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux