mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-21 16:57:58 +02:00
Fix compiler warnings by ensuring variable initialization
This commit is contained in:
parent
4019ad5bb7
commit
93b28c02df
@ -32,8 +32,8 @@ void TcpSocket::Bind(const String& node, const String& service, int family)
|
||||
{
|
||||
addrinfo hints;
|
||||
addrinfo *result;
|
||||
int error;
|
||||
const char *func;
|
||||
int error = 0;
|
||||
const char *func = nullptr;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = family;
|
||||
@ -126,8 +126,8 @@ void TcpSocket::Connect(const String& node, const String& service)
|
||||
{
|
||||
addrinfo hints;
|
||||
addrinfo *result;
|
||||
int error;
|
||||
const char *func;
|
||||
int error = 0;
|
||||
const char *func = nullptr;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
|
@ -552,7 +552,7 @@ Dictionary::Ptr LegacyTimePeriod::FindNextSegment(const String& daydef, const St
|
||||
ProcessTimeRanges(timeranges, &iter, segments);
|
||||
|
||||
Dictionary::Ptr bestSegment;
|
||||
double bestBegin;
|
||||
double bestBegin = 0;
|
||||
|
||||
ObjectLock olock(segments);
|
||||
for (const Dictionary::Ptr& segment : segments) {
|
||||
|
@ -26,8 +26,8 @@ do { \
|
||||
} while (0)
|
||||
|
||||
struct lex_buf {
|
||||
char *buf;
|
||||
size_t size;
|
||||
char *buf = NULL;
|
||||
size_t size = 0;
|
||||
};
|
||||
|
||||
static void lb_init(lex_buf *lb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user