From 1ca110b547622f788d94530e0e3432845c2943bf Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 5 Sep 2019 14:42:41 +0000 Subject: [PATCH] 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 Reviewed-by: Jeremy Allison --- source3/passdb/pdb_smbpasswd.c | 6 ++---- 1 file 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; -- 2.47.3