[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous DNS
From: |
Andreas Schwab |
Subject: |
Re: Asynchronous DNS |
Date: |
Mon, 29 Feb 2016 09:41:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Lars Ingebrigtsen <address@hidden> writes:
> A C question. I did the obvious
>
> gai_suspend (&p->dns_request, 1, NULL);
>
> and that gave me this warning:
>
> process.c: In function 'Fdelete_process':
> process.c:861:21: warning: passing argument 1 of 'gai_suspend' from
> incompatible pointer type [-Wincompatible-pointer-types]
> gai_suspend (&p->dns_request,
> ^
> In file included from process.c:38:0:
> /usr/include/netdb.h:703:12: note: expected 'const struct gaicb * const*' but
> argument is of type 'struct gaicb **'
> extern int gai_suspend (const struct gaicb *const __list[], int __ent,
> ^
>
> Is the only difference here really the consts? If so, the following
> cast should make stuff "work", but...
Yes, it's a hole in the C type system that has been fixed in C++
(http://c-faq.com/ansi/constmismatch.html).
Andreas.
--
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
- Re: Asynchronous DNS, (continued)
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Paul Eggert, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/21
- Re: Asynchronous DNS, YAMAMOTO Mitsuharu, 2016/02/26
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/26
- Re: Asynchronous DNS, Alain Schneble, 2016/02/27
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/27
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/28
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/28
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/28
- Re: Asynchronous DNS,
Andreas Schwab <=
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/21
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/22