(set_local_socket, main):
Use const char *, not char *, for pointers that are not assigned
through.
+ (IF_LINT): New macro.
+ (set_local_socket, main): Use it to suppress warnings with
+ GCC -Wuninitialized.
* emacsclient.c: Redo local variables to avoid shadowing problems.
(message, socket_status, start_daemon_and_retry_set_socket):
/* Additional space when allocating buffers for filenames, etc. */
#define EXTRA_SPACE 100
+/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
\f
/* Name used to invoke this program. */
const char *progname;
int default_sock = !socket_name;
int saved_errno = 0;
const char *server_name = "server";
- const char *tmpdir;
+ const char *tmpdir IF_LINT ( = NULL);
if (socket_name && !strchr (socket_name, '/')
&& !strchr (socket_name, '\\'))
int rl, needlf = 0;
char *cwd, *str;
char string[BUFSIZ+1];
- int null_socket_name, null_server_file, start_daemon_if_needed;
+ int null_socket_name IF_LINT ( = 0);
+ int null_server_file IF_LINT ( = 0);
+ int start_daemon_if_needed;
int exit_status = EXIT_SUCCESS;
main_argv = argv;