Commit e49e587c authored by brendan's avatar brendan

gcc 3.3 warns: dereferencing type-punned pointer will break strict-aliasing rules

svn path=/trunk/httpp/; revision=4906
parent b4166442
......@@ -478,11 +478,13 @@ char *httpp_getvar(http_parser_t *parser, char *name)
{
http_var_t var;
http_var_t *found;
void *fp;
fp = &found;
var.name = name;
var.value = NULL;
if (avl_get_by_key(parser->vars, (void *)&var, (void **)&found) == 0)
if (avl_get_by_key(parser->vars, &var, fp) == 0)
return found->value;
else
return NULL;
......@@ -513,11 +515,13 @@ char *httpp_get_query_param(http_parser_t *parser, char *name)
{
http_var_t var;
http_var_t *found;
void *fp;
fp = &found;
var.name = name;
var.value = NULL;
if (avl_get_by_key(parser->queryvars, (void *)&var, (void **)&found) == 0)
if (avl_get_by_key(parser->queryvars, (void *)&var, fp) == 0)
return found->value;
else
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment