public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Reddy K via Libc-help <libc-help@sourceware.org>
Cc: Reddy K <haritha.ponnolu@gmail.com>
Subject: Re: Regarding FD_ZERO compilation warning
Date: Mon, 20 Jun 2022 09:31:23 +0200	[thread overview]
Message-ID: <87edzjn644.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAF7YG7o8Hc2KkHjyn3qfvR7g8D220NDP6Hm1LVHWQZ3wsKC+mA@mail.gmail.com> (Reddy K. via Libc-help's message of "Mon, 20 Jun 2022 09:17:17 +0530")

* Reddy K. via Libc-help:

> I have enabled all compilation flags and did "make" build. I got the
> warning below and have tried to include required header files ( select.h,
> time.h, types.h and unistd.h) but still it shows the warning. So can you
> please help me to fix this.
>
> ds_locator.c:930:2: warning: traditional C rejects string constant
> concatenation [-Wtraditional]
> FD_ZERO(&readfds);
>
> I am pasting the code snippet below to understand how variable readfds
> define.
> -----------------------------
> fd_set readfds;
> FD_ZERO(&readfds);
>
> ----------------------------

I don't see how glibc's FD_ZERO can trigger this compiler warning.

I suggest you generate preprocessed sources with gcc --save-temps or gcc
-E, and show us the macro expansion.

In general, there is no expectation that the glibc headers are clean
with -Wtraditional, quite the opposite actually.  We require an ISO C
compiler.

Thanks,
Florian


  reply	other threads:[~2022-06-20  7:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  3:47 Reddy K
2022-06-20  7:31 ` Florian Weimer [this message]
2022-06-20 11:04   ` Reddy K
2022-06-20 11:09     ` Florian Weimer
2022-06-20 11:23       ` Reddy K
2022-06-20 11:26         ` Florian Weimer

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=87edzjn644.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=haritha.ponnolu@gmail.com \
    --cc=libc-help@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).