This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[Patch] Fix ONE_DIRECTION undef warnings.
- From: "Steve Ellcey " <sellcey at mips dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Mon, 28 Apr 2014 10:38:35 -0700
- Subject: [Patch] Fix ONE_DIRECTION undef warnings.
- Authentication-results: sourceware.org; auth=none
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