gl_INIT
# These are warnings we could enable:
-# -W -Wchar-subscripts -Wformat-security -Wnonnull -Winit-self -Wmissing-include-dirs -Wunused -Wno-unused-parameter -Wfloat-equal -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wvla -Wvolatile-register-var -Wdisabled-optimization -Wstack-protector -Woverlength-strings
+#
+# -Wchar-subscripts -Wformat-security -Wnonnull -Winit-self
+# --Wmissing-include-dirs -Wunused -Wno-unused-parameter -Wfloat-equal
+# --Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations
+# --Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align
+# --Wlogical-op -Waggregate-return -Wstrict-prototypes
+# --Wold-style-definition -Wmissing-prototypes -Wmissing-declarations
+# --Wmissing-noreturn -Wmissing-format-attribute -Wpacked
+# --Wredundant-decls -Wnested-externs -Winline -Wvla
+# --Wvolatile-register-var -Wdisabled-optimization -Wstack-protector
+# --Woverlength-strings
#
# These are warnings we have tried but have turned out not to be useful:
#
# -Wundef: warns on '#if GNULIB_PORTCHECK' etc in gnulib headers
# -Wpadded: many of our structs are not optimized for padding
# -Wtraditional-conversion: we catch missing prototypes anyway
-# -Wno-unused-parameter: added because -Wunused cause too many warns
# -Wunreachable-code: appears to return many false positives
# -Wconversion: too many warnings for now
# -Wswitch-default: too many warnings for now
# -Wswitch-enum: too many warnings for now
+#
+# These are warnings that we had to explicitly disable:
+#
+# -Wno-pointer-sign: too many warnings for now
+# -Wno-unused-parameter: added because -Wunused cause too many warns
-for w in -Wall -Wno-pointer-sign; do
+for w in -Wall -W -Wno-pointer-sign -Wno-unused-parameter; do
gl_WARN_ADD([$w])
done
export WARN_CFLAGS
typedef struct
{
char session_id[MAX_SESSION_ID_SIZE];
- int session_id_size;
+ size_t session_id_size;
char session_data[MAX_SESSION_DATA_SIZE];
- int session_data_size;
+ size_t session_data_size;
} CACHE;
static CACHE *cache_db;
opaque * data, size_t sizeofdata)
{
ssize_t len;
+ uint32_t len24;
opaque pkt[4];
len = _gnutls_recv_int (session, GNUTLS_INNER_APPLICATION, -1, pkt, 4);
}
*msg_type = pkt[0];
- len = _gnutls_read_uint24 (&pkt[1]);
+ len24 = _gnutls_read_uint24 (&pkt[1]);
- if (*msg_type != GNUTLS_IA_APPLICATION_PAYLOAD && len != CHECKSUM_SIZE)
+ if (*msg_type != GNUTLS_IA_APPLICATION_PAYLOAD && len24 != CHECKSUM_SIZE)
{
gnutls_assert ();
return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;
}
- if (sizeofdata < len)
+ if (sizeofdata < len24)
{
/* XXX push back pkt to IA buffer? */
gnutls_assert ();
return GNUTLS_E_SHORT_MEMORY_BUFFER;
}
- if (len > 0)
+ if (len24 > 0)
{
- int tmplen = len;
+ uint32_t tmplen = len24;
- len = _gnutls_recv_int (session, GNUTLS_INNER_APPLICATION, -1,
- data, tmplen);
- if (len != tmplen)
+ len24 = _gnutls_recv_int (session, GNUTLS_INNER_APPLICATION, -1,
+ data, tmplen);
+ if (len24 != tmplen)
{
gnutls_assert ();
/* XXX Correct? */
}
}
- return len;
+ return len24;
}
/* Apply the TLS PRF using the TLS/IA inner secret as keying material,
SUBDIRS = cfg
-AM_CPPFLAGS = \
- $(WARN_CFLAGS) \
+INCS = \
-I$(srcdir)/../gl \
-I$(builddir)/../gl \
-I$(builddir)/../lib/includes \
-I$(srcdir)/../lib/includes \
-I$(srcdir)/../libextra/includes \
-I$(srcdir)/cfg
+AM_CPPFLAGS = $(WARN_CFLAGS) $(INCS)
bin_PROGRAMS = gnutls-serv gnutls-cli psktool gnutls-cli-debug
if ENABLE_PKI
if HAVE_LIBCFG
certtool_LDADD += -lcfg+
else
-certtool_SOURCES += cfg/cfg+.c cfg/cfgfile.c cfg/cmdline.c cfg/parse.c \
+noinst_LTLIBRARIES = libcfg.la
+libcfg_la_CPPFLAGS = $(INCS)
+libcfg_la_SOURCES = cfg/cfg+.c cfg/cfgfile.c cfg/cmdline.c cfg/parse.c \
cfg/props.c cfg/shared.c cfg/platon/str/dynfgets.c \
cfg/platon/str/strctype.c cfg/platon/str/strdyn.c \
cfg/platon/str/strplus.c
+certtool_LDADD += libcfg.la
endif
noinst_PROGRAMS = errcodes printlist
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j;
+ int l;
+ size_t i, j;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j;
+ int l;
+ size_t i, j;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j;
+ int l;
+ size_t i, j;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j;
+ int l;
+ size_t i, j;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j, k;
+ int l;
+ size_t i, j, k;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;
{
int ret;
char tmp_session_id[32];
- int tmp_session_id_size;
+ size_t tmp_session_id_size;
if (session == NULL)
return TEST_IGNORE;
int gaa(int argc, char **argv, gaainfo *gaaval)
{
int tmp1, tmp2;
- int i, j;
+ int l;
+ size_t i, j;
char *opt_list;
+ i = 0;
+
GAAargv = argv;
GAAargc = argc;
opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
- for(i = 0; i < GAA_NB_OPTION + 1; i++)
- opt_list[i] = 0;
+ for(l = 0; l < GAA_NB_OPTION + 1; l++)
+ opt_list[l] = 0;
/* initialization */
if(inited == 0)
{
gaa_arg_used = gaa_malloc(argc * sizeof(char));
}
- for(i = 1; i < argc; i++)
- gaa_arg_used[i] = 0;
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
+ gaa_arg_used[l] = 0;
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
j = 0;
- tmp1 = gaa_is_an_argument(GAAargv[i]);
+ tmp1 = gaa_is_an_argument(GAAargv[l]);
switch(tmp1)
{
case GAA_WORD_OPTION:
j++;
case GAA_LETTER_OPTION:
j++;
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%s'\n", argv[i]+j);
+ printf("Invalid option '%s'\n", argv[l]+j);
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
default:
printf("Unknown error\n");
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
case GAA_MULTIPLE_OPTION:
- for(j = 1; j < strlen(argv[i]); j++)
+ for(j = 1; j < strlen(argv[l]); j++)
{
- tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
+ tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
if(tmp2 == GAA_ERROR_NOMATCH)
{
- printf("Invalid option '%c'\n", *(argv[i]+j));
+ printf("Invalid option '%c'\n", *(argv[l]+j));
return 0;
}
- switch(gaa_try(tmp2, i+1, gaaval, opt_list))
+ switch(gaa_try(tmp2, l+1, gaaval, opt_list))
{
case GAA_ERROR_NOTENOUGH_ARGS:
printf("'%s': not enough arguments\n",gaa_current_option);
printf("Unknown error\n");
}
}
- gaa_arg_used[i] = 1;
+ gaa_arg_used[l] = 1;
break;
default: break;
}
}
#endif
}
- for(i = 1; i < argc; i++)
+ for(l = 1; l < argc; l++)
{
- if(gaa_arg_used[i] == 0)
+ if(gaa_arg_used[l] == 0)
{
printf("Too many arguments\n");
return 0;