Fix some compiler warnings when -Wextra is added to CFLAGS.
This commit is contained in:
parent
c3553396d9
commit
a7961f1a97
|
|
@ -399,6 +399,7 @@ static void set_static_system_info(void)
|
||||||
/* Get memory information */
|
/* Get memory information */
|
||||||
static int get_sysmem(struct sys_memory *memall)
|
static int get_sysmem(struct sys_memory *memall)
|
||||||
{
|
{
|
||||||
|
NG_IGNORE(memall);
|
||||||
fprintf(stderr, "System memory info is not available\n");
|
fprintf(stderr, "System memory info is not available\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1641,11 +1641,13 @@ check_ifparm_compare(const void *a, const void *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_TDESTROY
|
||||||
static void
|
static void
|
||||||
check_ifparm_freenode(void *node)
|
check_ifparm_freenode(void *node)
|
||||||
{
|
{
|
||||||
NG_IGNORE(node);
|
NG_IGNORE(node);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -2573,7 +2573,7 @@ static void replace_freq(struct card *c, int *line_number)
|
||||||
++keywd;
|
++keywd;
|
||||||
cp = key;
|
cp = key;
|
||||||
while (*keywd && !isspace_c(*keywd) && *keywd != '}' &&
|
while (*keywd && !isspace_c(*keywd) && *keywd != '}' &&
|
||||||
cp - key < sizeof key - 1) {
|
cp - key < (long)(sizeof key - 1)) {
|
||||||
*cp++ = *keywd++;
|
*cp++ = *keywd++;
|
||||||
}
|
}
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
|
|
@ -6826,7 +6826,7 @@ static void inp_compat(struct card *card)
|
||||||
K13 L2 L3 1
|
K13 L2 L3 1
|
||||||
*/
|
*/
|
||||||
else if (*curr_line == 'k') {
|
else if (*curr_line == 'k') {
|
||||||
int tokcount = 0;
|
int tokcount = 0, idx1, idx2;
|
||||||
char* kinst, **ltok, *couple;
|
char* kinst, **ltok, *couple;
|
||||||
cut_line = curr_line;
|
cut_line = curr_line;
|
||||||
/* get number of tokens */
|
/* get number of tokens */
|
||||||
|
|
@ -6841,20 +6841,20 @@ static void inp_compat(struct card *card)
|
||||||
cut_line = curr_line;
|
cut_line = curr_line;
|
||||||
kinst = gettok(&cut_line);
|
kinst = gettok(&cut_line);
|
||||||
ltok = TMALLOC(char*, tokcount);
|
ltok = TMALLOC(char*, tokcount);
|
||||||
for (i = 0; i < tokcount; i++) {
|
for (idx1 = 0; idx1 < tokcount; idx1++) {
|
||||||
ltok[i] = gettok(&cut_line);
|
ltok[idx1] = gettok(&cut_line);
|
||||||
}
|
}
|
||||||
couple = gettok(&cut_line);
|
couple = gettok(&cut_line);
|
||||||
*curr_line = '*';
|
*curr_line = '*';
|
||||||
for (i = 0; i < tokcount - 1; i++)
|
for (idx1 = 0; idx1 < tokcount - 1; idx1++)
|
||||||
for (ii = i + 1; ii < tokcount; ii++) {
|
for (idx2 = idx1 + 1; idx2 < tokcount; idx2++) {
|
||||||
char* newline = tprintf("%s_%d_%d %s %s %s", kinst, (int)i + 1, (int)ii + 1, ltok[i], ltok[ii], couple);
|
char* newline = tprintf("%s_%d_%d %s %s %s", kinst, idx1 + 1, idx2 + 1, ltok[idx1], ltok[idx2], couple);
|
||||||
card = insert_new_line(card, newline, (int)i + 1, currlinenumber, card->linesource);
|
card = insert_new_line(card, newline, idx1 + 1, currlinenumber, card->linesource);
|
||||||
}
|
}
|
||||||
tfree(kinst);
|
tfree(kinst);
|
||||||
tfree(couple);
|
tfree(couple);
|
||||||
for (i = 0; i < tokcount; i++) {
|
for (idx1 = 0; idx1 < tokcount; idx1++) {
|
||||||
tfree(ltok[i]);
|
tfree(ltok[idx1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ INPevaluateRKM_R(char** line, int* error, int gobble)
|
||||||
int num;
|
int num;
|
||||||
char ch;
|
char ch;
|
||||||
if (sscanf(here + 1, "%i%c", &num, &ch) == 1) {
|
if (sscanf(here + 1, "%i%c", &num, &ch) == 1) {
|
||||||
expo1 = expo1;
|
//expo1 = expo1;
|
||||||
hasmulti = TRUE;
|
hasmulti = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -612,7 +612,7 @@ INPevaluateRKM_C(char** line, int* error, int gobble)
|
||||||
case 'r':
|
case 'r':
|
||||||
case 'R':
|
case 'R':
|
||||||
|
|
||||||
expo1 = expo1;
|
//expo1 = expo1;
|
||||||
hasmulti = TRUE;
|
hasmulti = TRUE;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
|
@ -850,7 +850,7 @@ INPevaluateRKM_L(char** line, int* error, int gobble)
|
||||||
case 'r':
|
case 'r':
|
||||||
case 'R':
|
case 'R':
|
||||||
|
|
||||||
expo1 = expo1;
|
//expo1 = expo1;
|
||||||
hasmulti = TRUE;
|
hasmulti = TRUE;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue