This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Minor tweak for vec.[ch]
- From: Zack Weinberg <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Fri, 09 Jul 2004 13:57:36 -0700
- Subject: Minor tweak for vec.[ch]
__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__)