diff options
author | Noel Power <noel.power@suse.com> | 2019-09-05 14:42:41 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-09-26 18:41:28 +0000 |
commit | 1ca110b547622f788d94530e0e3432845c2943bf (patch) | |
tree | fe214e60b15c7bdadf547a3ff5b8fdac7c9e4ae5 /source3/passdb | |
parent | 2138bd93bb258f2dde2c279a0ba80f9a40737aed (diff) | |
download | samba-1ca110b547622f788d94530e0e3432845c2943bf.tar.gz |
s3/passdb: clang: Value stored to 'c' is never read
source3/passdb/pdb_smbpasswd.c:405:4: warning: Value stored to 'c' is never read <--[clang]
c = '\0';
^ ~~~~
/home/samba/samba/source3/passdb/pdb_smbpasswd.c:809:4: warning: Value stored to 'c' is never read <--[clang]
c = '\0';
^ ~~~~
2 warnings generated.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index a9def1260d4..bed3cea744c 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -367,7 +367,6 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s unsigned char *smbpwd = smbpasswd_state->smbpwd; unsigned char *smbntpwd = smbpasswd_state->smbntpwd; char linebuf[256]; - int c; unsigned char *p; long uidval; size_t linebuf_len; @@ -402,8 +401,8 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s } if (linebuf[linebuf_len - 1] != '\n') { - c = '\0'; while (!ferror(fp) && !feof(fp)) { + int c; c = fgetc(fp); if (c == '\n') { break; @@ -740,7 +739,6 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con #define LINEBUF_SIZE 255 char linebuf[LINEBUF_SIZE + 1]; char readbuf[1024]; - int c; char ascii_p16[FSTRING_LEN + 20]; fstring encode_bits; unsigned char *p = NULL; @@ -806,8 +804,8 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con */ linebuf_len = strlen(linebuf); if (linebuf[linebuf_len - 1] != '\n') { - c = '\0'; while (!ferror(fp) && !feof(fp)) { + int c; c = fgetc(fp); if (c == '\n') { break; |