mirror of
https://github.com/open-simh/simtools.git
synced 2026-05-01 22:05:56 +00:00
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:
12
macro11.c
12
macro11.c
@@ -75,7 +75,7 @@ static void enable_tf(
|
||||
list_md = tf;
|
||||
}
|
||||
|
||||
//JH:
|
||||
/*JH:*/
|
||||
static void print_version(
|
||||
FILE *strm)
|
||||
{
|
||||
@@ -178,14 +178,14 @@ int main(
|
||||
/* Followed by options to enable */
|
||||
/* Since /SHOW and /ENABL option names don't overlap,
|
||||
I consolidate. */
|
||||
if(arg >= argc-1 || !isalpha(*argv[arg+1])) {
|
||||
if(arg >= argc-1 || !isalpha((unsigned char)*argv[arg+1])) {
|
||||
usage("-e must be followed by an option to enable\n");
|
||||
}
|
||||
upcase(argv[++arg]);
|
||||
enable_tf(argv[arg], 1);
|
||||
} else if (!stricmp(cp, "d")) {
|
||||
/* Followed by an option to disable */
|
||||
if(arg >= argc-1 || !isalpha(*argv[arg+1])) {
|
||||
if(arg >= argc-1 || !isalpha((unsigned char)*argv[arg+1])) {
|
||||
usage("-d must be followed by an option to disable\n");
|
||||
}
|
||||
upcase(argv[++arg]);
|
||||
@@ -253,13 +253,13 @@ int main(
|
||||
into individual .MAC files in the current
|
||||
directory. No assembly of input is done. This
|
||||
must be the last command line option. */
|
||||
int i;
|
||||
int m;
|
||||
|
||||
if(arg != argc-1) {
|
||||
usage("-x must be the last option\n");
|
||||
}
|
||||
for (i = 0; i < nr_mlbs; i++)
|
||||
mlb_extract(mlbs[i]);
|
||||
for (m = 0; m < nr_mlbs; m++)
|
||||
mlb_extract(mlbs[m]);
|
||||
return EXIT_SUCCESS;
|
||||
} else if (!stricmp(cp, "ysl")) {
|
||||
/* set symbol_len */
|
||||
|
||||
Reference in New Issue
Block a user