Fix a gcc -Wshadow warning

svn path=/trunk/; revision=33077
This commit is contained in:
Bill Meier 2010-06-03 19:14:18 +00:00
parent 673a9de331
commit 5a307bb6d1
1 changed files with 13 additions and 13 deletions

View File

@ -369,18 +369,18 @@ set_time_adjustment(char *optarg_str_p)
} }
static void static void
set_strict_time_adj(char *optarg) set_strict_time_adj(char *optarg_str_p)
{ {
char *frac, *end; char *frac, *end;
long val; long val;
size_t frac_digits; size_t frac_digits;
if (!optarg) if (!optarg_str_p)
return; return;
/* skip leading whitespace */ /* skip leading whitespace */
while (*optarg == ' ' || *optarg == '\t') { while (*optarg_str_p == ' ' || *optarg_str_p == '\t') {
optarg++; optarg_str_p++;
} }
/* /*
@ -388,25 +388,25 @@ set_strict_time_adj(char *optarg)
* A negative strict adjustment value is a flag * A negative strict adjustment value is a flag
* to adjust all frames by the specifed delta time. * to adjust all frames by the specifed delta time.
*/ */
if (*optarg == '-') { if (*optarg_str_p == '-') {
strict_time_adj.is_negative = 1; strict_time_adj.is_negative = 1;
optarg++; optarg_str_p++;
} }
/* collect whole number of seconds, if any */ /* collect whole number of seconds, if any */
if (*optarg == '.') { /* only fractional (i.e., .5 is ok) */ if (*optarg_str_p == '.') { /* only fractional (i.e., .5 is ok) */
val = 0; val = 0;
frac = optarg; frac = optarg_str_p;
} else { } else {
val = strtol(optarg, &frac, 10); val = strtol(optarg_str_p, &frac, 10);
if (frac == NULL || frac == optarg || val == LONG_MIN || val == LONG_MAX) { if (frac == NULL || frac == optarg_str_p || val == LONG_MIN || val == LONG_MAX) {
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg); optarg_str_p);
exit(1); exit(1);
} }
if (val < 0) { /* implies '--' since we caught '-' above */ if (val < 0) { /* implies '--' since we caught '-' above */
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg); optarg_str_p);
exit(1); exit(1);
} }
} }
@ -423,7 +423,7 @@ set_strict_time_adj(char *optarg)
if (*frac != '.' || end == NULL || end == frac if (*frac != '.' || end == NULL || end == frac
|| val < 0 || val > ONE_MILLION || val == LONG_MIN || val == LONG_MAX) { || val < 0 || val > ONE_MILLION || val == LONG_MIN || val == LONG_MAX) {
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg); optarg_str_p);
exit(1); exit(1);
} }
} }