Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: aic7xxx: Fix compiler warnings triggered by user space code

Fix the following compiler warnings:

aicasm_gram.y:1107:24: warning: comparison of different enumeration types
('scope_type' and 'enum yytokentype') [-Wenum-compare]
1107 | || last_scope->type == T_ELSE) {
| ~~~~~~~~~~~~~~~~ ^ ~~~~~~
aicasm_scan.l:392:14: warning: using the result of an assignment as a condition
without parentheses [-Wparentheses]
392 | while (c = *yptr++) {
| ~~^~~~~~~~~
aicasm_macro_scan.l:153:1: warning: non-void function does not return a value
[-Wreturn-type]
153 | }
| ^

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260402153341.2909184-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
1821f77f 23c29ca1

+3 -3
+1 -1
drivers/scsi/aic7xxx/aicasm/aicasm.h
··· 82 82 extern int dst_mode; 83 83 struct symbol; 84 84 85 - void stop(const char *errstring, int err_code); 85 + void __attribute__((noreturn)) stop(const char *errstring, int err_code); 86 86 void include_file(char *file_name, include_type type); 87 87 void expand_macro(struct symbol *macro_symbol); 88 88 struct instruction *seq_alloc(void);
+1 -1
drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
··· 1104 1104 last_scope = TAILQ_LAST(&scope_context->inner_scope, 1105 1105 scope_tailq); 1106 1106 if (last_scope == NULL 1107 - || last_scope->type == T_ELSE) { 1107 + || last_scope->type == (int)T_ELSE) { 1108 1108 1109 1109 stop("'else if' without leading 'if'", EX_DATAERR); 1110 1110 /* NOTREACHED */
+1 -1
drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
··· 389 389 char c; 390 390 391 391 yptr = yytext; 392 - while (c = *yptr++) { 392 + while ((c = *yptr++)) { 393 393 /* 394 394 * Strip carriage returns. 395 395 */