Subject: Re: bug#7838: Acknowledgement (24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X)

From: Peter Dyballa <[email-masked]>
Date: Thu, 31 Mar 2011 19:26:06 +0200

Hello!

GCC 4.5.2 now reports:

.../emacs-24.0.50/lib-src/emacsclient.c: In Funktion »set_local_socket«:
.../emacs-24.0.50/lib-src/emacsclient.c:1251:17: Warnung: Übergabe des  
Arguments 2 von »confstr« entfernt Kennzeichner von Zeiger-Ziel-Typ
/usr/include/unistd.h:423:9: Anmerkung: expected »char *« but argument  
is of type »const char *«

  1238	    if (default_sock)
  1239	      {
  1240		tmpdir = egetenv ("TMPDIR");
  1241		if (!tmpdir)
  1242	          {
  1243	#ifdef DARWIN_OS
  1244	#ifndef _CS_DARWIN_USER_TEMP_DIR
  1245	#define _CS_DARWIN_USER_TEMP_DIR 65537
  1246	#endif
  1247	            size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL,  
(size_t) 0);
  1248	            if (n > 0)
  1249	              {
  1250	                tmpdir = alloca (n);
  1251	                confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
  1252	              }
  1253	            else
  1254	#endif
  1255	              tmpdir = "/tmp";
  1256	          }

And in /usr/include/unistd.h:

   414	__BEGIN_DECLS
   415	
   416	void	 _exit(int) __dead2;
   417	int	 access(const char *, int);
   418	unsigned int
   419		 alarm(unsigned int);
   420	int	 chdir(const char *);
   421	int	 chown(const char *, uid_t, gid_t);
   422	int	 close(int) __DARWIN_ALIAS_C(close);
   423	size_t	 confstr(int, char *, size_t) __DARWIN_ALIAS(confstr);
   424	char	*crypt(const char *, const char *);
   425	char	*ctermid(char *);

--
Greetings

   Pete

Without vi there is only GNU Emacs