git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2ead17
)
s3:vfs_preopen: avoid compiler warnings
author
Stefan Metzmacher
<metze@samba.org>
Fri, 10 Apr 2015 09:31:31 +0000
(11:31 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 19 May 2015 11:43:13 +0000
(13:43 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/modules/vfs_preopen.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_preopen.c
b/source3/modules/vfs_preopen.c
index cc38a90d7c1871f638efe4d464dd96e562f9950d..c83d3124cc0eb70a06286259bcf4d1418855f0d7 100644
(file)
--- a/
source3/modules/vfs_preopen.c
+++ b/
source3/modules/vfs_preopen.c
@@
-149,7
+149,7
@@
static bool preopen_helper_open_one(int sock_fd, char **pnamebuf,
size_t to_read, void *filebuf)
{
char *namebuf = *pnamebuf;
- ssize_t n
written, n
read;
+ ssize_t nread;
char c = 0;
int fd;
@@
-185,7
+185,7
@@
static bool preopen_helper_open_one(int sock_fd, char **pnamebuf,
close(fd);
done:
-
nwritten =
write(sock_fd, &c, 1);
+
(void)
write(sock_fd, &c, 1);
return true;
}
@@
-341,7
+341,8
@@
static struct preopen_state *preopen_state_get(vfs_handle_struct *handle)
static bool preopen_parse_fname(const char *fname, unsigned long *pnum,
size_t *pstart_idx, int *pnum_digits)
{
- const char *p, *q;
+ const char *p;
+ char *q = NULL;
unsigned long num;
p = strrchr_m(fname, '/');