public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Minor tweak for vec.[ch]
@ 2004-07-09 21:39 Zack Weinberg
  0 siblings, 0 replies; only message in thread
From: Zack Weinberg @ 2004-07-09 21:39 UTC (permalink / raw)
  To: gcc-patches, Nathan Sidwell


__LINE__ is an unsigned int, and it's being printed with %u, so it
should be passed around as an unsigned int, not a size_t.  This fixes
some warnings on amd64-linux.

zw

        * vec.c, vec.h (vec_assert_fail): Use unsigned int for LINE argument.

===================================================================
Index: vec.c
--- vec.c	8 Jul 2004 09:45:17 -0000	2.4
+++ vec.c	9 Jul 2004 20:56:33 -0000
@@ -82,7 +82,7 @@ vec_o_reserve (void *vec, int reserve, s
 
 void
 vec_assert_fail (const char *op, const char *struct_name,
-		 const char *file, size_t line, const char *function)
+		 const char *file, unsigned int line, const char *function)
 {
   internal_error ("vector %s %s domain error, in %s at %s:%u",
 		  struct_name, op, function, trim_filename (file), line);
===================================================================
Index: vec.h
--- vec.h	9 Jul 2004 08:33:22 -0000	2.7
+++ vec.h	9 Jul 2004 20:56:34 -0000
@@ -251,7 +251,7 @@ extern void *vec_o_reserve (void *, int,
 
 #if ENABLE_CHECKING
 extern void vec_assert_fail (const char *, const char *,
-			    const char *, size_t, const char *)
+			    const char *, unsigned int, const char *)
      ATTRIBUTE_NORETURN;
 #define VEC_ASSERT_FAIL(OP,VEC) \
   vec_assert_fail (OP,#VEC,__FILE__,__LINE__,__FUNCTION__)

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

only message in thread, other threads:[~2004-07-09 20:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09 21:39 Minor tweak for vec.[ch] Zack Weinberg

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).