This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Fix ONE_DIRECTION undef warnings.


Here is another attempt to fix some undef warnings.  The only use of
ONE_DIRECTION is in iconv/skeleton.c and the only setting of it is in
iconv/gconv_simple.c (where it is set to 1).  This patch checks (in
skeleton.c) to see if it is set and then sets it to 0 if it is not.
The use of it, later in skeleton.c is already done with a '#if' so
nothing needed to be changed there.

Tested on mips-mti-linux-gnu, the only code change was to the line
number info in the assert calls.

Steve Ellcey
sellcey@mips.com


2014-04-28  Steve Ellcey  <sellcey@mips.com>

	* iconf/skelenton.c (ONE_DIRECTION): Set default value if not set.


diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index c3f161a..1908949 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -163,6 +163,10 @@
 # endif
 #endif
 
+#ifndef ONE_DIRECTION
+# define ONE_DIRECTION 0
+#endif
+
 
 /* How many bytes are needed at most for the from-charset.  */
 #ifndef MAX_NEEDED_FROM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]