This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas/read.c warning fix
- From: Ben Elliston <bje at gnu dot org>
- To: binutils at sources dot redhat dot com
- Date: 07 Dec 2004 23:12:15 +1100
- Subject: 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);
}