This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

gas/read.c warning fix


I've committed the following patch as obvious:

2004-12-07  Ben Elliston  <bje@gnu.org>

	* read.c (s_align): Use an align_limit temporary to allay a GCC
	signed/unsigned comparison warning.

Index: read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.82
diff -u -u -r1.82 read.c
--- read.c	2 Dec 2004 09:39:14 -0000	1.82
+++ read.c	7 Dec 2004 12:11:22 -0000
@@ -1204,6 +1204,7 @@
 static void
 s_align (int arg, int bytes_p)
 {
+  unsigned int align_limit = ALIGN_LIMIT;
   unsigned int align;
   char *stop = NULL;
   char stopc;
@@ -1243,9 +1244,9 @@
 	}
     }
 
-  if (align > ALIGN_LIMIT)
+  if (align > align_limit)
     {
-      align = ALIGN_LIMIT;
+      align = align_limit;
       as_warn (_("alignment too large: %u assumed"), align);
     }
 


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