diff mbox

Fix -Wundef warning for ONE_DIRECTION in iconv/skeleton.c

Message ID mvm61n2mqs1.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab March 25, 2014, noon UTC
All places that define ONE_DIRECTION define it to 1, so I think this is
the right way to fix the warning.

Andreas.

	* iconv/skeleton.c (ONE_DIRECTION): Check for definedness, not
	value.
---
 iconv/skeleton.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Roland McGrath March 25, 2014, 4:53 p.m. UTC | #1
> All places that define ONE_DIRECTION define it to 1, so I think this is
> the right way to fix the warning.

It's still typo-prone.
diff mbox

Patch

diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 14318a6..d1b89b0 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -564,7 +564,7 @@  FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
 					outend, lirreversiblep
 					EXTRA_LOOP_ARGS);
 # endif
-# if !ONE_DIRECTION
+# ifndef ONE_DIRECTION
 #  if FROM_LOOP_MAX_NEEDED_FROM > 1 && TO_LOOP_MAX_NEEDED_FROM > 1
 	  else
 #  endif