mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-24 08:41:34 +00:00
Initialize get_resolvconf_addr variable rv to NULL
Getting warning compiling for Android: ./util.c:35:6: warning: variable 'rv' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (sscanf(buf, "%15s", addr) == 1) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./util.c:79:9: note: uninitialized use occurs here return rv; ^~
This commit is contained in:
parent
cfd0b07e1f
commit
f5a82afe29
@ -22,7 +22,7 @@
|
|||||||
char *get_resolvconf_addr(void)
|
char *get_resolvconf_addr(void)
|
||||||
{
|
{
|
||||||
static char addr[16];
|
static char addr[16];
|
||||||
char *rv;
|
char *rv = NULL;
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
char buf[80];
|
char buf[80];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user