Skip to content

Commit

Permalink
Silence compiler warning in test/error.c
Browse files Browse the repository at this point in the history
Observed on Debian 12, with `CC=gcc`:

> test/error.c:172:23: error: address of array 'ebuf->buf' will
> always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
  • Loading branch information
craigbarnes committed Dec 30, 2024
1 parent f1ff10b commit fdef9b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void test_normal_command_errors(TestContext *ctx)
runner.lookup_alias = dummy_lookup_alias;
clear_error(e->err);
EXPECT_FALSE(handle_command(&runner, "_abc"));
EXPECT_TRUE(ebuf->buf && str_has_prefix(ebuf->buf, "Parsing alias _abc:"));
EXPECT_TRUE(str_has_prefix(ebuf->buf, "Parsing alias _abc:"));
EXPECT_TRUE(ebuf->is_error);

EXPECT_NULL(current_config.file);
Expand Down

0 comments on commit fdef9b7

Please sign in to comment.