Skip to content

Commit e68709f

Browse files
committed
Fix warnings in lwan-tables when building in release mode
1 parent 7ce06aa commit e68709f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/lib/lwan-tables.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,11 @@ LWAN_SELF_TEST(status_codes)
110110
{
111111
#define ASSERT_STATUS(id, code, short, long) \
112112
do { \
113-
const char *status = lwan_http_status_as_string_with_code(HTTP_##id); \
114-
assert(!strncmp(status, #code, 3)); \
115-
const char *status_as_str = lwan_http_status_as_string(HTTP_##id); \
116-
assert(!strcmp(status_as_str, short)); \
117-
const char *descr = lwan_http_status_as_descriptive_string(HTTP_##id); \
118-
assert(!strcmp(descr, long)); \
113+
assert(!strncmp(lwan_http_status_as_string_with_code(HTTP_##id), \
114+
#code, 3)); \
115+
assert(!strcmp(lwan_http_status_as_string(HTTP_##id), short)); \
116+
assert( \
117+
!strcmp(lwan_http_status_as_descriptive_string(HTTP_##id), long)); \
119118
} while (0);
120119
FOR_EACH_HTTP_STATUS(ASSERT_STATUS)
121120
#undef ASSERT_STATUS

0 commit comments

Comments
 (0)