public inbox for gwml@vger.gnuweeb.org
 help / color / mirror / Atom feed
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Ahmad Gani <reyuki@gnuweeb.org>
Cc: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: Re: [PATCH gwproxy v4 0/6] Initial work for DNS lookup implementation
Date: Thu, 7 Aug 2025 03:50:33 +0700	[thread overview]
Message-ID: <aJPAGdI5BITFBjXl@linux.gnuweeb.org> (raw)
In-Reply-To: <aJMklZvcF21wyhLG@linux.gnuweeb.org>

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
>       | 
> <command-line>: 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


  reply	other threads:[~2025-08-06 20:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  3:57 [PATCH gwproxy v4 0/6] Initial work for DNS lookup implementation Ahmad Gani
2025-08-06  3:57 ` [PATCH gwproxy v4 1/6] dnslookup: Split common functionality and struct into net.h and net.c Ahmad Gani
2025-08-06  6:18   ` Alviro Iskandar Setiawan
2025-08-06  3:57 ` [PATCH gwproxy v4 2/6] dnslookup: Add a new parameter default_port Ahmad Gani
2025-08-06  6:20   ` Alviro Iskandar Setiawan
2025-08-06  3:57 ` [PATCH gwproxy v4 3/6] dnslookup: Allow only port string number Ahmad Gani
2025-08-06  3:57 ` [PATCH gwproxy v4 4/6] dnslookup: Initial work for implementation of C-ares-like getaddrinfo function Ahmad Gani
2025-08-06  6:40   ` Alviro Iskandar Setiawan
2025-08-06  6:51     ` Alviro Iskandar Setiawan
2025-08-06  8:43       ` Ahmad Gani
2025-08-06  8:40     ` Ahmad Gani
2025-08-06 11:09   ` Alviro Iskandar Setiawan
2025-08-06 11:20     ` Alviro Iskandar Setiawan
2025-08-06 11:39       ` Ammar Faizi
2025-08-06 12:30         ` Ahmad Gani
2025-08-06 20:54           ` Ammar Faizi
2025-08-06 12:30       ` Ahmad Gani
2025-08-06 21:33         ` Ammar Faizi
2025-08-14  4:54           ` Ahmad Gani
2025-08-06  3:57 ` [PATCH gwproxy v4 5/6] dnsparser: Transaction id creation is delegated to caller Ahmad Gani
2025-08-06  6:28   ` Alviro Iskandar Setiawan
2025-08-06 10:20     ` Ahmad Gani
2025-08-06 10:51       ` Alviro Iskandar Setiawan
2025-08-06 12:29         ` Ahmad Gani
2025-08-06  3:57 ` [PATCH gwproxy v4 6/6] dnslookup: Make gw_ares_getaddrinfo asynchronous Ahmad Gani
2025-08-06  6:22   ` Alviro Iskandar Setiawan
2025-08-06  8:42     ` Ahmad Gani
2025-08-06  7:03 ` [PATCH gwproxy v4 0/6] Initial work for DNS lookup implementation Ammar Faizi
2025-08-06  7:08 ` Ammar Faizi
2025-08-06  8:37   ` Ahmad Gani
2025-08-06  8:58     ` Ammar Faizi
2025-08-06  9:47       ` Ammar Faizi
2025-08-06 20:50         ` Ammar Faizi [this message]
2025-08-06 22:14     ` Ammar Faizi
2025-08-06  7:08 ` (subset) " Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJPAGdI5BITFBjXl@linux.gnuweeb.org \
    --to=ammarfaizi2@gnuweeb.org \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=gwml@vger.gnuweeb.org \
    --cc=reyuki@gnuweeb.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox