Fix for Val constructor with new int64 typedefs.

Val::Val had prototypes for int, long, int64, etc. But depending on the
architecture some of those might be the same (int64 and long) thus
yielding a compile error.
Fix: only use int32, int64, etc. for prototype. ints and longs can still
be passed, since they will match one of these fixed-width types
regardless of platform.

Also fix some more compiler warnings with format strings.
This commit is contained in:
Gregor Maier 2011-02-09 15:53:49 -08:00
parent 2aae4eaf91
commit 2ced4839e9
2 changed files with 6 additions and 26 deletions

View file

@ -87,7 +87,7 @@ public:
#endif
}
Val(int i, TypeTag t)
Val(int32 i, TypeTag t)
{
val.int_val = bro_int_t(i);
type = base_type(t);
@ -97,27 +97,7 @@ public:
#endif
}
Val(long i, TypeTag t)
{
val.int_val = bro_int_t(i);
type = base_type(t);
attribs = 0;
#ifdef DEBUG
bound_id = 0;
#endif
}
Val(unsigned int u, TypeTag t)
{
val.uint_val = bro_uint_t(u);
type = base_type(t);
attribs = 0;
#ifdef DEBUG
bound_id = 0;
#endif
}
Val(unsigned long u, TypeTag t)
Val(uint32 u, TypeTag t)
{
val.uint_val = bro_uint_t(u);
type = base_type(t);