From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1754513438; bh=QdupjHDGkyhqILn6CuseQkkV/baGdC9m95nwiucPmmU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To:Message-ID:Date: From:Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=Q/f+VGzlXjv30iI/SNENCAeRgEFj9clqGUFGhUYciOV2b/nfDcHYS+yZiHrg4wsYy kxDu8uYY0AH3cw1ESazsHZsBJRICYBdOs5kI1+Ynez/1zIpWOT5dUeCTCUXiG8+KvX YyjmQEUTKGqxZ1J+AojpTOBpWC2u5NxpzGO+I8F1GeMohXdlPuyBB3uoRSVdUF8xuW 463orNuKdPmgccy0rXyhph0HW71hlc4SDkFLt19thoSbGkCZPxiHffTBE4pReEHCZk fiFPH+TsfQmU+gnCMLXDQo3u/i8RGYTQNTmI+IKijflfSXUZowT0cLu9iWWiOcDaLZ qJZgX8FaQGuCA== Received: from linux.gnuweeb.org (unknown [182.253.126.229]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 298133127C01; Wed, 6 Aug 2025 20:50:36 +0000 (UTC) Date: Thu, 7 Aug 2025 03:50:33 +0700 From: Ammar Faizi To: Ahmad Gani Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: Re: [PATCH gwproxy v4 0/6] Initial work for DNS lookup implementation Message-ID: References: <20250806035727.216702-1-reyuki@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Machine-Hash: hUx9VaHkTWcLO7S8CQCslj6OzqBx2hfLChRz45nPESx5VSB/xuJQVOKOB1zSXE3yc9ntP27bV1M1 List-Id: On Wed, Aug 06, 2025 at 04:47:05PM +0700, Ammar Faizi wrote: > Yeah, it's missing -Werror flag on the CI, so it didn't fail. That warning > actually exists: > > x86_64-linux-gnu-gcc -ggdb3 -fvisibility=hidden -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-stack-protector -Wunsafe-loop-optimizations -Wstrict-aliasing=3 -Wstrict-prototypes -Wmissing-prototypes -Wstack-usage=8192 -Wformat -Wformat-security -Wformat-signedness -Wunreachable-code -Wsequence-point -Wextra -Wall -O2 -fpic -fPIC -D_GNU_SOURCE -include /home/runner/work/gwproxy/gwproxy/config.h -I./src/ -DNDEBUG -MMD -MP -MF src/gwproxy/ev/epoll.c.o.d -c src/gwproxy/ev/epoll.c -o src/gwproxy/ev/epoll.c.o > src/gwproxy/net.c:1: warning: "_GNU_SOURCE" redefined > 1 | #define _GNU_SOURCE > | > : note: this is the location of the previous definition I was a bit busy deep cleaning my house and had several video calls. Now I am back to this CI thing, it turned out that when enabling io_uring support, it breaks 32-bit architectures. This one is from i686: ``` src/gwproxy/ev/io_uring.c: In function ‘prep_timer_del_target’: src/gwproxy/ev/io_uring.c:327:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 327 | io_uring_prep_timeout_remove(s, EV_BIT_TIMER | (uint64_t)gcp, 0); | ^ src/gwproxy/ev/io_uring.c: In function ‘handle_event’: src/gwproxy/ev/io_uring.c:773:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 773 | void *udata = (void *)CLEAR_EV_BIT(cqe->user_data); | ^ In file included from ./src/gwproxy/gwproxy.h:15, from ./src/gwproxy/ev/io_uring.h:8, from src/gwproxy/ev/io_uring.c:11: src/gwproxy/ev/io_uring.c:857:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘int’ [-Werror=format=] 857 | pr_err(&ctx->lh, "Bug, invalid %s: res=%d, fd=%ld, s=%s", inv_op, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 858 | cqe->res, (intptr_t)udata, strerror(-cqe->res)); | ~~~~~~~~~~~~~~~ | | | int ./src/gwproxy/log.h:40:41: note: in definition of macro ‘pr_log’ 40 | __pr_log(__hd->handle, __level, FMT, ##__VA_ARGS__); \ | ^~~ src/gwproxy/ev/io_uring.c:857:9: note: in expansion of macro ‘pr_err’ 857 | pr_err(&ctx->lh, "Bug, invalid %s: res=%d, fd=%ld, s=%s", inv_op, | ^~~~~~ src/gwproxy/ev/io_uring.c:857:57: note: format string is defined here 857 | pr_err(&ctx->lh, "Bug, invalid %s: res=%d, fd=%ld, s=%s", inv_op, | ~~^ | | | long int | %d ``` Apparently this happens because a pointer size on 32-bit architectures is 32-bit. We need double-casts to fix mess. I'll fix it. -- Ammar Faizi