Skip to content

Commit

Permalink
libkeymap: Add parentheses to fix build warning
Browse files Browse the repository at this point in the history
Fix build warning:

analyze.l: In function ‘find_standard_incl_file’:
analyze.l:180:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  180 |         if (rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
      |             ^~

Signed-off-by: Alexey Gladkov <[email protected]>
  • Loading branch information
legionus committed Sep 17, 2024
1 parent 11d4562 commit 8246f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libkeymap/analyze.l
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ find_standard_incl_file(struct lk_ctx *ctx, char *s, struct kbdfile *fp)
i--;
pathname = kbdfile_get_pathname(ctx->stack[i]);

if (rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
if ((rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp))) {
if ((rc = find_incl_file_near_fn(ctx, s, pathname, fp)) == -1)
return rc;
}
Expand Down

0 comments on commit 8246f5f

Please sign in to comment.