Crank up the warning levels, and adjust the code to silence ...

several compilers:
- gcc version 4.5.3 (NetBSD nb2 20110806)
- gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
- Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)

The warnings were mostly about local variables shadowing others,
unused function parameters, and C++ style comments. Some variables were
indeed used before set.

Note that on Linux, using -std=c99 does stupid things like *remove* the
declaration of strdup() from <string.h>. Therefore I've reluctantly used
-std=gnu99.
This commit is contained in:
Olaf Seibert
2015-05-27 21:51:26 +02:00
parent 8a2ba3adf0
commit d38f4009c4
17 changed files with 133 additions and 110 deletions

View File

@@ -724,6 +724,9 @@ EX_TREE *evaluate(
res->data.child.right = right;
}
break;
default:
fprintf(stderr, "Invalid tree\n");
return NULL;
}
res->cp = cp;