summaryrefslogtreecommitdiff
path: root/extra/xorg-xinit/fix-globals-shadowing.patch
blob: d9e0a18f93bab233601d9d3a8913567455a6fc96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 182920f156c87715d91b2f64b8781a0072af996e Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun, 08 Sep 2013 16:48:50 +0000
Subject: Fix warnings about parameters to startServer & startClient shadowing globals

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
---
diff --git a/xinit.c b/xinit.c
index 18e3e10..1b04911 100644
--- a/xinit.c
+++ b/xinit.c
@@ -390,7 +390,7 @@ processTimeout(int timeout, const char *string)
 }
 
 static pid_t
-startServer(char *server[])
+startServer(char *server_argv[])
 {
     sigset_t mask, old;
     const char * const *cpp;
@@ -422,12 +422,12 @@ startServer(char *server[])
          * if client is xterm -L
          */
         setpgid(0,getpid());
-        Execute(server);
+        Execute(server_argv);
 
-        Error("unable to run server \"%s\"", server[0]);
+        Error("unable to run server \"%s\"", server_argv[0]);
 
         fprintf(stderr, "Use the -- option, or make sure that %s is in your path and\n", bindir);
-        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server[0]);
+        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server_argv[0]);
         fprintf(stderr, "for your display.  Possible server names include:\n\n");
         for (cpp = server_names; *cpp; cpp++)
             fprintf(stderr, "    %s\n", *cpp);
@@ -556,7 +556,7 @@ setWindowPath(void)
 }
 
 static pid_t
-startClient(char *client[])
+startClient(char *client_argv[])
 {
     clientpid = fork();
     if (clientpid == 0) {
@@ -568,8 +568,8 @@ startClient(char *client[])
             _exit(EXIT_FAILURE);
         }
         setpgid(0, getpid());
-        Execute(client);
-        Error("Unable to run program \"%s\"", client[0]);
+        Execute(client_argv);
+        Error("Unable to run program \"%s\"", client_argv[0]);
 
         fprintf(stderr, "Specify a program on the command line or make sure that %s\n", bindir);
         fprintf(stderr, "is in your path.\n\n");
--
cgit v0.9.0.2-2-gbebe