Fix compilation errors/warning with gcc-5.4.0 (#137)

Warning are like this:
 error: ‘delimiter’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
This commit is contained in:
geaaru
2017-08-15 08:56:22 +02:00
committed by Johan Wikman
parent 7021041804
commit 3485a32731
13 changed files with 25 additions and 25 deletions

View File

@ -596,11 +596,11 @@ static CACHE_RULE *cache_rule_create_simple_user(cache_rule_attribute_t attribut
const char *cvalue,
uint32_t debug)
{
CACHE_RULE *rule = NULL;
ss_dassert(attribute == CACHE_ATTRIBUTE_USER);
ss_dassert((op == CACHE_OP_EQ) || (op == CACHE_OP_NEQ));
CACHE_RULE *rule = NULL;
bool error = false;
size_t len = strlen(cvalue);
@ -911,7 +911,7 @@ static CACHE_RULE *cache_rule_create_simple(cache_rule_attribute_t attribute,
{
ss_dassert((op == CACHE_OP_EQ) || (op == CACHE_OP_NEQ));
CACHE_RULE *rule;
CACHE_RULE *rule = NULL;
switch (attribute)
{
@ -1526,7 +1526,7 @@ static bool cache_rule_matches_table_regexp(CACHE_RULE *self,
bool matches = false;
int n;
char **names;
char **names = NULL;
bool fullnames;
fullnames = true;
@ -1612,7 +1612,7 @@ static bool cache_rule_matches_table_simple(CACHE_RULE *self, const char *defaul
}
int n;
char **names;
char **names = NULL;
names = qc_get_table_names((GWBUF*)query, &n, fullnames);

View File

@ -892,7 +892,7 @@ char* get_regex_string(char** saved)
{
char *start = NULL, *ptr = *saved;
bool escaped = false, quoted = false;
char delimiter;
char delimiter = 0;
while (*ptr != '\0')
{
if (!escaped)