public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix warning in time/strptime_l.c
@ 2005-01-09  9:58 Andreas Jaeger
  0 siblings, 0 replies; only message in thread
From: Andreas Jaeger @ 2005-01-09  9:58 UTC (permalink / raw)
  To: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]


The appended patch fixes this warning:

strptime_l.c:541: warning: suggest explicit braces to avoid ambiguous ‘else’

Ok to commit?

Andreas

2005-01-09  Andreas Jaeger  <aj@suse.de>

	* time/strptime_l.c (__strptime_internal): Add braces to avoid
	warning.

============================================================
Index: time/strptime_l.c
--- time/strptime_l.c	9 Aug 2004 19:47:44 -0000	1.4
+++ time/strptime_l.c	9 Jan 2005 09:57:16 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -539,10 +539,12 @@ __strptime_internal (rp, fmt, tm, decide
 	    }
 #endif
 	  if (!match_string (HERE_AM_STR, rp))
-	    if (match_string (HERE_PM_STR, rp))
-	      is_pm = 1;
-	    else
-	      return NULL;
+	    {
+	      if (match_string (HERE_PM_STR, rp))
+		is_pm = 1;
+	      else
+		return NULL;
+	    }
 	  break;
 	case 'r':
 #ifdef _NL_CURRENT

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-09  9:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-09  9:58 Fix warning in time/strptime_l.c Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).