SNAS / openbmp

OpenBMP Server Collector
www.openbmp.org
Eclipse Public License 1.0
232 stars 76 forks source link

Uninitialized variable warning #52

Closed alistairking closed 7 years ago

alistairking commented 7 years ago

When building using clang (Apple LLVM version 9.0.0 (clang-900.0.37)), I get the following warning about use of an uninitialized variable:

Server/src/bgp/linkstate/MPLinkStateAttr.cpp:335:99: error: variable 'value_32bit' is uninitialized when used here [-Werror,-Wuninitialized]
                SELF_DEBUG("%s: bgp-ls: parsed node ISIS area id %x (len=%d)", peer_addr.c_str(), value_32bit, len);

https://github.com/OpenBMP/openbmp/blob/56f25123839761cfc589030804d6ed53badda313/Server/src/bgp/linkstate/MPLinkStateAttr.cpp#L335

This indeed does seem to be a bug, but only one that affects the debug message.

I'm not sure the correct way to fix this since the ISIS area ID appears to be an 8-byte value.

TimEvens commented 7 years ago

fixed.