lint: retrieving string arguments from str_list

This commit is contained in:
dick 1988-11-03 13:20:27 +00:00
parent 0e895422bc
commit 190ea14bbf
4 changed files with 3 additions and 7 deletions

View file

@ -339,7 +339,6 @@ function2pointer(exp)
string2pointer(ex) string2pointer(ex)
register struct expr *ex; register struct expr *ex;
{ {
#ifndef LINT
/* The expression, which must be a string constant, is converted /* The expression, which must be a string constant, is converted
to a pointer to the string-containing area. to a pointer to the string-containing area.
*/ */
@ -350,7 +349,6 @@ string2pointer(ex)
ex->VL_CLASS = Label; ex->VL_CLASS = Label;
ex->VL_LBL = lbl; ex->VL_LBL = lbl;
ex->VL_VALUE = (arith)0; ex->VL_VALUE = (arith)0;
#endif LINT
} }
opnd2integral(expp, oper) opnd2integral(expp, oper)

View file

@ -72,9 +72,8 @@ init_code(dst_file)
} }
#endif LINT #endif LINT
static struct string_cst *str_list = 0; struct string_cst *str_list = 0;
#ifndef LINT
code_string(val, len, dlb) code_string(val, len, dlb)
char *val; char *val;
int len; int len;
@ -89,7 +88,6 @@ code_string(val, len, dlb)
sc->sc_len = len; sc->sc_len = len;
sc->sc_dlb = dlb; sc->sc_dlb = dlb;
} }
#endif LINT
def_strings(sc) def_strings(sc)
register struct string_cst *sc; register struct string_cst *sc;

View file

@ -12,6 +12,8 @@ struct string_cst { /* storing string constants */
label sc_dlb; label sc_dlb;
}; };
extern struct string_cst *str_list;
/* ALLOCDEF "string_cst" 10 */ /* ALLOCDEF "string_cst" 10 */
#define LVAL 0 #define LVAL 0

View file

@ -489,12 +489,10 @@ check_ival(expp, tp)
else /* e.g., int a; int *p = &a; */ else /* e.g., int a; int *p = &a; */
C_con_dnam(idf->id_text, expr->VL_VALUE); C_con_dnam(idf->id_text, expr->VL_VALUE);
} }
#ifndef LINT
else { else {
ASSERT(expr->VL_CLASS == Label); ASSERT(expr->VL_CLASS == Label);
C_con_dlb(expr->VL_LBL, expr->VL_VALUE); C_con_dlb(expr->VL_LBL, expr->VL_VALUE);
} }
#endif LINT
break; break;
#ifndef NOFLOAT #ifndef NOFLOAT
case FLOAT: case FLOAT: