[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Thu Mar 1 18:39:02 UTC 2018
The branch, master has been updated
via 33fa677 wafsamba: Build with -Wimplicit-fallthrough if supported
via 654a66b auth:credentials: Avoid an 'else' branch
via 9a971bc auth:credentials: Add FALL_THROUGH statements in credentials.c
from c380626 winbind: Fix --ping-dc error handling
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 33fa6778e1d95c41733c43b2b694cd22d440e4c6
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jul 26 16:29:06 2017 +0200
wafsamba: Build with -Wimplicit-fallthrough if supported
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Thu Mar 1 19:38:12 CET 2018 on sn-devel-144
commit 654a66b72dcf99884dafcf3659f513b634073da8
Author: Andreas Schneider <asn at samba.org>
Date: Thu Mar 1 11:04:49 2018 +0100
auth:credentials: Avoid an 'else' branch
This moves the 'return' statement to the end of the 'case' and makes clear
we leave here.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 9a971bcd0799763966be6c3f1350130140e436e2
Author: Andreas Schneider <asn at samba.org>
Date: Wed Jul 26 18:20:53 2017 +0200
auth:credentials: Add FALL_THROUGH statements in credentials.c
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
auth/credentials/credentials.c | 12 ++++++++----
buildtools/wafsamba/samba_autoconf.py | 2 ++
2 files changed, 10 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c
index 4f3042e..4663185 100644
--- a/auth/credentials/credentials.c
+++ b/auth/credentials/credentials.c
@@ -1277,17 +1277,21 @@ _PUBLIC_ bool cli_credentials_parse_password_fd(struct cli_credentials *credenti
*++p = '\0'; /* advance p, and null-terminate pass */
break;
}
- /* fall through */
+
+ FALL_THROUGH;
case 0:
if (p - pass) {
*p = '\0'; /* null-terminate it, just in case... */
p = NULL; /* then force the loop condition to become false */
break;
- } else {
- fprintf(stderr, "Error reading password from file descriptor %d: %s\n", fd, "empty password\n");
- return false;
}
+ fprintf(stderr,
+ "Error reading password from file descriptor "
+ "%d: empty password\n",
+ fd);
+ return false;
+
default:
fprintf(stderr, "Error reading password from file descriptor %d: %s\n",
fd, strerror(errno));
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index cc08e0d..35f4f36 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -711,6 +711,8 @@ def SAMBA_CONFIG_H(conf, path=None):
testflags=True)
conf.ADD_CFLAGS('-Werror=uninitialized -Wuninitialized',
testflags=True)
+ conf.ADD_CFLAGS('-Wimplicit-fallthrough',
+ testflags=True)
conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
conf.ADD_CFLAGS('-Wno-format-zero-length', testflags=True)
--
Samba Shared Repository
More information about the samba-cvs
mailing list