diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-12-07 18:09:54 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-12-07 18:09:54 -0800 |
commit | 0d2837162ef0e54647485eee2ba4b88012fbb1b4 (patch) | |
tree | 96bdbf365ad8f7fc1d194ded7b95a39b44714a0a | |
parent | 6d5cb0110b8b21ce94a52993e6e175266a4153fb (diff) |
Fix C23 build by renaming variable 'true'
Reported by gcc 13.2 with -std=gnu2x:
xprop.c: In function ‘Handle_Question_Mark’:
xprop.c:1291:10: error: expected identifier or ‘(’ before ‘true’
1291 | long true;
| ^~~~
xprop.c:1293:49: error: lvalue required as unary ‘&’ operand
1293 | dformat = Scan_Exp(dformat, thunks, format, &true);
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xprop.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1288,15 +1288,15 @@ Scan_Exp (const char *string, thunk *thunks, const char *format, long *value) static const char * Handle_Question_Mark (const char *dformat, thunk *thunks, const char *format) { - long true; + long is_true; - dformat = Scan_Exp(dformat, thunks, format, &true); + dformat = Scan_Exp(dformat, thunks, format, &is_true); if (*dformat != '(') Fatal_Error("Bad conditional: '(' expected: %s.", dformat); ++dformat; - if (!true) + if (!is_true) dformat = Skip_Past_Right_Paren(dformat); return dformat; |