Skip to content

Commit 4824934

Browse files
committed
http: server: gate lws_authorization_rewrite on LWS_WITH_FILE_OPS
lws_authorization_rewrite() is only called from lws_check_basic_auth(), inside its LWS_WITH_FILE_OPS block. With basic auth enabled but file ops disabled the function is defined but never referenced, tripping -Wunused-function. Widen its guard to match the caller.
1 parent ff4452b commit 4824934

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/roles/http/server/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ lws_http_get_uri_and_method(struct lws *wsi, char **puri_ptr, int *puri_len)
13001300
return -1;
13011301
}
13021302

1303-
#if defined(LWS_WITH_HTTP_BASIC_AUTH)
1303+
#if defined(LWS_WITH_HTTP_BASIC_AUTH) && defined(LWS_WITH_FILE_OPS)
13041304

13051305
static int
13061306
lws_authorization_rewrite(struct lws *wsi, const char *name, size_t len)

0 commit comments

Comments
 (0)