mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 09:17:43 +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 hints;
|
||||||
addrinfo *result;
|
addrinfo *result;
|
||||||
int error;
|
int error = 0;
|
||||||
const char *func;
|
const char *func = nullptr;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = family;
|
hints.ai_family = family;
|
||||||
@ -126,8 +126,8 @@ void TcpSocket::Connect(const String& node, const String& service)
|
|||||||
{
|
{
|
||||||
addrinfo hints;
|
addrinfo hints;
|
||||||
addrinfo *result;
|
addrinfo *result;
|
||||||
int error;
|
int error = 0;
|
||||||
const char *func;
|
const char *func = nullptr;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
|
@ -552,7 +552,7 @@ Dictionary::Ptr LegacyTimePeriod::FindNextSegment(const String& daydef, const St
|
|||||||
ProcessTimeRanges(timeranges, &iter, segments);
|
ProcessTimeRanges(timeranges, &iter, segments);
|
||||||
|
|
||||||
Dictionary::Ptr bestSegment;
|
Dictionary::Ptr bestSegment;
|
||||||
double bestBegin;
|
double bestBegin = 0;
|
||||||
|
|
||||||
ObjectLock olock(segments);
|
ObjectLock olock(segments);
|
||||||
for (const Dictionary::Ptr& segment : segments) {
|
for (const Dictionary::Ptr& segment : segments) {
|
||||||
|
@ -26,8 +26,8 @@ do { \
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
struct lex_buf {
|
struct lex_buf {
|
||||||
char *buf;
|
char *buf = NULL;
|
||||||
size_t size;
|
size_t size = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void lb_init(lex_buf *lb)
|
static void lb_init(lex_buf *lb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user