fix warnings reported by clang static analyzer

channel.c:338:2: warning: Undefined or garbage value returned to caller
channel.c:353:2: warning: Undefined or garbage value returned to caller
channel.c:368:2: warning: Undefined or garbage value returned to caller
channel.c:383:2: warning: Undefined or garbage value returned to caller
This commit is contained in:
David du Colombier 2015-06-15 22:11:58 +02:00
parent 305a8b3f47
commit f75fc7ab04

View File

@ -334,6 +334,7 @@ chanrecvp(Channel *c)
{
void *v;
v = NULL;
_chanop(c, CHANRCV, (void*)&v, 1);
return v;
}
@ -349,6 +350,7 @@ channbrecvp(Channel *c)
{
void *v;
v = NULL;
_chanop(c, CHANRCV, (void*)&v, 0);
return v;
}
@ -364,6 +366,7 @@ chanrecvul(Channel *c)
{
ulong val;
val = 0;
_chanop(c, CHANRCV, &val, 1);
return val;
}
@ -379,6 +382,7 @@ channbrecvul(Channel *c)
{
ulong val;
val = 0;
_chanop(c, CHANRCV, &val, 0);
return val;
}