tools/mksymtab: Fix a compilation warning
Fix: ``` mksymtab.c: In function ‘main’: mksymtab.c:280:15: warning: the comparison will always evaluate as ‘true’ for the address of ‘g_parm’ will never be NULL [-Waddress] 280 | cond = (g_parm[COND_INDEX] && strlen(g_parm[COND_INDEX]) > 0); ``` Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
4719e44b8b
commit
b21f68d751
@ -277,7 +277,7 @@ int main(int argc, char **argv, char **envp)
|
||||
|
||||
/* Output any conditional compilation */
|
||||
|
||||
cond = (g_parm[COND_INDEX] && strlen(g_parm[COND_INDEX]) > 0);
|
||||
cond = strlen(g_parm[COND_INDEX]) > 0;
|
||||
if (cond)
|
||||
{
|
||||
fprintf(outstream, "%s#if %s\n", nextterm, g_parm[COND_INDEX]);
|
||||
|
Loading…
Reference in New Issue
Block a user