Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / builder / b-logproxy.c
Author[]Andy Green <andy@warmcat.com> 2026-10-04 20:05 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-10-04 20:05 UTC
Tree6d95d3487da8797921774c480647138c5ed18129   Raw Patch
 
push, web: hold lws_struct_json_serialize() results in their own type
push, web: hold lws_struct_json_serialize() results in their own type

Clang's -Wsign-conversion, which the Mac build is using, rejects
storing the result enum in an int.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/src/push/pu-state.c b/src/push/pu-state.c index 2b29e83..0282a40 100644 --- a/src/push/pu-state.c +++ b/src/push/pu-state.c @@ -170,8 +170,9 @@ saip_state_save(void) struct lwsac *ac = NULL; saip_state_entry_t *e; uint8_t buf[1024]; + lws_struct_json_serialize_result_t r; saip_state_t st; - int fd, r, bad = 0; + int fd, bad = 0; size_t w; memset(&st, 0, sizeof(st)); diff --git a/src/web/w-rss.c b/src/web/w-rss.c index e0f7acd..219a770 100644 --- a/src/web/w-rss.c +++ b/src/web/w-rss.c @@ -540,9 +540,9 @@ static int saiw_feed_render_json(struct pss *pss, sai_feed_t *f) { lws_struct_serialize_t *js; + lws_struct_json_serialize_result_t r; uint8_t buf[4096]; size_t w; - int r; js = lws_struct_json_serialize_create(lsm_schema_json_map_feed, LWS_ARRAY_SIZE(lsm_schema_json_map_feed), 0, f);
Page fetched 0s ago, creation time: 2ms (vhost etag hits: 0%, cache hits: 0%)