mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix build warning on Lenny about strtok_r unit test
This fixes a warning in efb8a09f
, where Debain Lenny's GCC doesn't get
that
for (i=0; i<3; ++i) {
const char *p;
switch(i) {
case 0:
p="X"; break;
case 1:
p="Y"; break;
case 2:
p="Z"; break;
}
printf("%s\n", p);
}
will never try to print an uninitialezed value.
Found by buildbots. Bug in no released versions of Tor.
This commit is contained in:
parent
f4db3e2631
commit
75b72bf621
@ -1826,10 +1826,9 @@ test_util_strtok(void)
|
||||
char *cp1, *cp2;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
const char *pad1, *pad2;
|
||||
const char *pad1="", *pad2="";
|
||||
switch (i) {
|
||||
case 0:
|
||||
pad1 = pad2 = "";
|
||||
break;
|
||||
case 1:
|
||||
pad1 = " ";
|
||||
|
Loading…
Reference in New Issue
Block a user