]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixing xcode warnings
authorJosh <jrosenba@cisco.com>
Wed, 7 May 2014 15:10:30 +0000 (11:10 -0400)
committerJosh <jrosenba@cisco.com>
Wed, 7 May 2014 15:23:08 +0000 (11:23 -0400)
src/codecs/misc/cd_gtp.cc
src/managers/packet_manager.cc

index bd6f6715a777e58494150a532b5d2b212217143b..c18ab5eac5f5f1e3359f36372ad898fe0c53d45c 100644 (file)
@@ -153,7 +153,7 @@ bool GtpCodec::decode(const uint8_t *raw_pkt, const uint32_t len,
             {
                 uint16_t ext_hdr_len;
                 /*check length before reading data*/
-                if (len < lyr_len + 4)
+                if (len < (uint32_t)(lyr_len + 4))
                 {
                     codec_events::decoder_event(p, DECODE_GTP_BAD_LEN);
                     return false;
index ee548853b6c0ebdf90cdac9fefbd91a512a652ba..82986e310e8c1e7f2d359b86117607bfaa39ddfc 100644 (file)
@@ -67,13 +67,13 @@ static std::list<const CodecApi*> s_codecs;
 
 // when initialization arrays, although the zero is not required
 // the compiler complains about a missing-field-initiliezers
-static std::array<uint8_t, max_protocol_id> s_proto_map{0};
-static std::array<Codec*, 256> s_protocols{0};
+static std::array<uint8_t, max_protocol_id> s_proto_map{{0}};
+static std::array<Codec*, 256> s_protocols{{0}};
 static THREAD_LOCAL uint8_t grinder = 0;
 
 // statistics information
-static THREAD_LOCAL std::array<PegCount, 256 + gen_peg_size> s_stats{0};
-static std::array<PegCount, 256 + gen_peg_size> g_stats{0};
+static THREAD_LOCAL std::array<PegCount, 256 + gen_peg_size> s_stats{{0}};
+static std::array<PegCount, 256 + gen_peg_size> g_stats{{0}};
 static THREAD_LOCAL CdGenPegs pkt_cnt;
 
 //-------------------------------------------------------------------------