[Xcb] [PATCH 2/2] Clean up some more function-scope-static abuse

Adam Jackson ajax at redhat.com
Wed Jun 28 15:45:42 UTC 2017


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 src/xcb_conn.c | 2 +-
 src/xcb_out.c  | 4 ++--
 src/xcb_util.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/xcb_conn.c b/src/xcb_conn.c
index 7d09637..6632d90 100644
--- a/src/xcb_conn.c
+++ b/src/xcb_conn.c
@@ -125,7 +125,7 @@ static int set_fd_flags(const int fd)
 
 static int write_setup(xcb_connection_t *c, xcb_auth_info_t *auth_info)
 {
-    static const char pad[3];
+    const char pad[3];
     xcb_setup_request_t out;
     struct iovec parts[6];
     int count = 0;
diff --git a/src/xcb_out.c b/src/xcb_out.c
index 3601a5f..dc51ae0 100644
--- a/src/xcb_out.c
+++ b/src/xcb_out.c
@@ -70,7 +70,7 @@ static inline void send_request(xcb_connection_t *c, int isvoid, enum workaround
 
 static void send_sync(xcb_connection_t *c)
 {
-    static const union {
+    const union {
         struct {
             uint8_t major;
             uint8_t pad;
@@ -237,7 +237,7 @@ uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iove
 
     if(!(flags & XCB_REQUEST_RAW))
     {
-        static const char pad[3];
+        const char pad[3];
         unsigned int i;
         uint16_t shortlen = 0;
         size_t longlen = 0;
diff --git a/src/xcb_util.c b/src/xcb_util.c
index a3357ef..d5605da 100644
--- a/src/xcb_util.c
+++ b/src/xcb_util.c
@@ -227,9 +227,9 @@ static int _xcb_open(const char *host, char *protocol, const int display)
 {
     int fd;
 #ifdef __hpux
-    static const char unix_base[] = "/usr/spool/sockets/X11/";
+    const char unix_base[] = "/usr/spool/sockets/X11/";
 #else
-    static const char unix_base[] = "/tmp/.X11-unix/X";
+    const char unix_base[] = "/tmp/.X11-unix/X";
 #endif
     const char *base = unix_base;
     size_t filelen;
-- 
2.13.0



More information about the Xcb mailing list