diff --git a/src/SerializationFormat.cc b/src/SerializationFormat.cc index d49233ec92..55e35eb30e 100644 --- a/src/SerializationFormat.cc +++ b/src/SerializationFormat.cc @@ -369,25 +369,25 @@ bool XMLSerializationFormat::Write(char v, const char* tag) bool XMLSerializationFormat::Write(uint16 v, const char* tag) { - const char* tmp = fmt("%u", v); + const char* tmp = fmt("%"PRIu16, v); return WriteElem(tag, "uint16", tmp, strlen(tmp)); } bool XMLSerializationFormat::Write(uint32 v, const char* tag) { - const char* tmp = fmt("%u", v); + const char* tmp = fmt("%"PRIu32, v); return WriteElem(tag, "uint32", tmp, strlen(tmp)); } bool XMLSerializationFormat::Write(uint64 v, const char* tag) { - const char* tmp = fmt("%llu", v); + const char* tmp = fmt("%"PRIu64, v); return WriteElem(tag, "uint64", tmp, strlen(tmp)); } bool XMLSerializationFormat::Write(int64 v, const char* tag) { - const char* tmp = fmt("%lld", v); + const char* tmp = fmt("%"PRId64, v); return WriteElem(tag, "int64", tmp, strlen(tmp)); } diff --git a/src/Val.h b/src/Val.h index d21562c907..39be5f0e6a 100644 --- a/src/Val.h +++ b/src/Val.h @@ -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);