[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c7b8194: Port to --enable-gcc-warnings sans getaddr
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master c7b8194: Port to --enable-gcc-warnings sans getaddrinfo_a |
Date: |
Tue, 23 Feb 2016 23:26:27 +0000 |
branch: master
commit c7b8194c04687cfb97c16180feb9f9c74d9fc848
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Port to --enable-gcc-warnings sans getaddrinfo_a
* src/process.c (Fmake_network_process): Add ATTRIBUTE_UNUSED
to a local unused when getaddrinfo_a is missing.
Resize portbuf to size needed. Do cheap test first.
Move local to block where it’s needed.
---
src/process.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/process.c b/src/process.c
index 41e821e..b8e1973 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3600,8 +3600,8 @@ usage: (make-network-process &rest ARGS) */)
struct Lisp_Process *p;
#if defined HAVE_GETADDRINFO || defined HAVE_GETADDRINFO_A
const char *portstring;
- ptrdiff_t portstringlen;
- char portbuf[128];
+ ptrdiff_t portstringlen ATTRIBUTE_UNUSED;
+ char portbuf[INT_BUFSIZE_BOUND (EMACS_INT)];
#endif
#ifdef HAVE_LOCAL_SOCKETS
struct sockaddr_un address_un;
@@ -3770,7 +3770,7 @@ usage: (make-network-process &rest ARGS) */)
#endif
#ifdef HAVE_GETADDRINFO_A
- if (!NILP (Fplist_get (contact, QCnowait)) && !NILP (host))
+ if (!NILP (host) && !NILP (Fplist_get (contact, QCnowait)))
{
ptrdiff_t hostlen = SBYTES (host);
struct req
@@ -4897,7 +4897,6 @@ wait_reading_process_output (intmax_t time_limit, int
nsecs, int read_kbd,
#if defined HAVE_GETADDRINFO_A || defined HAVE_GNUTLS
{
- Lisp_Object ip_addresses;
Lisp_Object process_list_head, aproc;
struct Lisp_Process *p;
@@ -4911,7 +4910,7 @@ wait_reading_process_output (intmax_t time_limit, int
nsecs, int read_kbd,
/* Check for pending DNS requests. */
if (p->dns_request)
{
- ip_addresses = check_for_dns (aproc);
+ Lisp_Object ip_addresses = check_for_dns (aproc);
if (!NILP (ip_addresses) && !EQ (ip_addresses, Qt))
connect_network_socket (aproc, ip_addresses);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master c7b8194: Port to --enable-gcc-warnings sans getaddrinfo_a,
Paul Eggert <=