]> git.eshelyaron.com Git - emacs.git/commit
Fix compiler thinking tmpdir may be unitialised in emacsclient
authorMichal Nazarewicz <mina86@mina86.com>
Mon, 12 Sep 2016 19:31:15 +0000 (21:31 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Mon, 12 Sep 2016 19:57:36 +0000 (21:57 +0200)
commitef474bd3d686cbf43a11056017ca8c92a304a25e
treee6f4015f74601c2373366f429369cabb28f8972f
parent5d7433aba3893d9d5849b33b909dacc778ecd023
Fix compiler thinking tmpdir may be unitialised in emacsclient

This fixes the following warning:

emacsclient.c: In function ‘set_local_socket’:
/usr/include/x86_64-linux-gnu/bits/string3.h:111:3: error:
‘tmpdir’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
   ^
emacsclient.c:1197:17: note: ‘tmpdir’ was declared here
     const char *tmpdir;

* lib-src/emacsclient.c (set_local_socket): Get rid of use_tmpdir
variable and instead use tmpdir being non-NULL as sign that it should
be used.
lib-src/emacsclient.c