2011-02-25 Paul Eggert <eggert@cs.ucla.edu>
+ * emacsclient.c: Redo local variables to avoid shadowing problems.
+ (message, socket_status, start_daemon_and_retry_set_socket):
+ Rename locals.
+ (main): Move decl of "i".
+
* etags.c (ISUPPER): Move to inside the only #ifdef where it's used.
This avoids an unused-macro warning with some GCC settings.
/* Display a normal or error message.
On Windows, use a message box if compiled as a Windows app. */
static void
-message (int is_error, const char *message, ...)
+message (int is_error, const char *format, ...)
{
char msg[2048];
va_list args;
- va_start (args, message);
- vsprintf (msg, message, args);
+ va_start (args, format);
+ vsprintf (msg, format, args);
va_end (args);
#ifdef WINDOWSNT
0 - success: none of the above */
static int
-socket_status (char *socket_name)
+socket_status (char *name)
{
struct stat statbfr;
- if (stat (socket_name, &statbfr) == -1)
+ if (stat (name, &statbfr) == -1)
return 2;
if (statbfr.st_uid != geteuid ())
else
{
char emacs[] = "emacs";
- char daemon[] = "--daemon";
- char *d_argv[] = {emacs, daemon, 0 };
+ char daemon_option[] = "--daemon";
+ char *d_argv[] = {emacs, daemon_option, 0 };
if (socket_name != NULL)
{
/* Pass --daemon=socket_name as argument. */
int
main (int argc, char **argv)
{
- int i, rl, needlf = 0;
+ int rl, needlf = 0;
char *cwd, *str;
char string[BUFSIZ+1];
int null_socket_name, null_server_file, start_daemon_if_needed;
if ((argc - optind > 0))
{
+ int i;
for (i = optind; i < argc; i++)
{