Silence fall-through warnings.

This commit is contained in:
Wayne Davison committed 2019-01-04 15:06:30 -08:00
1 parent a366868535
commit ad17b21889
7 files changed
+32 -17

No files matched your search

+2 -4
View File
@@ -1117,14 +1117,12 @@ int default_perms_for_dir(const char *dir)
case ENOSYS:
/* No ACLs are available. */
break;
case ENOENT:
if (dry_run) {
default:
if (dry_run && errno == ENOENT) {
/* We're doing a dry run, so the containing directory
* wasn't actually created. Don't worry about it. */
break;
}
/* Otherwise fall through. */
default:
rprintf(FWARNING,
"default_perms_for_dir: sys_acl_get_file(%s, %s): %s, falling back on umask\n",
dir, str_acl_type(SMB_ACL_TYPE_DEFAULT), strerror(errno));
+16
View File
@@ -25,51 +25,67 @@
case 0:
#elif !defined CASE_N_STATE_1
#define CASE_N_STATE_1
/* FALLTHROUGH */
case 1:
#elif !defined CASE_N_STATE_2
#define CASE_N_STATE_2
/* FALLTHROUGH */
case 2:
#elif !defined CASE_N_STATE_3
#define CASE_N_STATE_3
/* FALLTHROUGH */
case 3:
#elif !defined CASE_N_STATE_4
#define CASE_N_STATE_4
/* FALLTHROUGH */
case 4:
#elif !defined CASE_N_STATE_5
#define CASE_N_STATE_5
/* FALLTHROUGH */
case 5:
#elif !defined CASE_N_STATE_6
#define CASE_N_STATE_6
/* FALLTHROUGH */
case 6:
#elif !defined CASE_N_STATE_7
#define CASE_N_STATE_7
/* FALLTHROUGH */
case 7:
#elif !defined CASE_N_STATE_8
#define CASE_N_STATE_8
/* FALLTHROUGH */
case 8:
#elif !defined CASE_N_STATE_9
#define CASE_N_STATE_9
/* FALLTHROUGH */
case 9:
#elif !defined CASE_N_STATE_10
#define CASE_N_STATE_10
/* FALLTHROUGH */
case 10:
#elif !defined CASE_N_STATE_11
#define CASE_N_STATE_11
/* FALLTHROUGH */
case 11:
#elif !defined CASE_N_STATE_12
#define CASE_N_STATE_12
/* FALLTHROUGH */
case 12:
#elif !defined CASE_N_STATE_13
#define CASE_N_STATE_13
/* FALLTHROUGH */
case 13:
#elif !defined CASE_N_STATE_14
#define CASE_N_STATE_14
/* FALLTHROUGH */
case 14:
#elif !defined CASE_N_STATE_15
#define CASE_N_STATE_15
/* FALLTHROUGH */
case 15:
#elif !defined CASE_N_STATE_16
#define CASE_N_STATE_16
/* FALLTHROUGH */
case 16:
#else
#error Need to add more case statements!
-7
View File
@@ -138,7 +138,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
who_am_i(), code, file, line);
}
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -152,7 +151,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
}
}
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -183,7 +181,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
}
}
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -195,7 +192,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
if (!exit_code && !code)
io_flush(FULL_FLUSH);
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -226,7 +222,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
|| am_daemon || (logfile_name && (am_server || !INFO_GTE(STATS, 1))))
log_exit(exit_code, exit_file, exit_line);
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -238,7 +233,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
dry_run ? " (DRY RUN)" : "");
}
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
@@ -254,7 +248,6 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
noop_io_until_death();
}
/* FALLTHROUGH */
#include "case_N.h"
switch_step++;
+11
View File
@@ -453,16 +453,27 @@ uint32_t hashlittle(const void *key, size_t length)
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
/* FALLTHROUGH */
case 11: c+=((uint32_t)k[10])<<16;
/* FALLTHROUGH */
case 10: c+=((uint32_t)k[9])<<8;
/* FALLTHROUGH */
case 9 : c+=k[8];
/* FALLTHROUGH */
case 8 : b+=((uint32_t)k[7])<<24;
/* FALLTHROUGH */
case 7 : b+=((uint32_t)k[6])<<16;
/* FALLTHROUGH */
case 6 : b+=((uint32_t)k[5])<<8;
/* FALLTHROUGH */
case 5 : b+=k[4];
/* FALLTHROUGH */
case 4 : a+=((uint32_t)k[3])<<24;
/* FALLTHROUGH */
case 3 : a+=((uint32_t)k[2])<<16;
/* FALLTHROUGH */
case 2 : a+=((uint32_t)k[1])<<8;
/* FALLTHROUGH */
case 1 : a+=k[0];
break;
case 0 : return c;
+1 -1
View File
@@ -214,7 +214,7 @@ static struct poptOption long_options[] = {
{0,0,0,0,0,0,0}
};
static void tls_usage(int ret)
static void NORETURN tls_usage(int ret)
{
FILE *F = ret ? stderr : stdout;
fprintf(F,"usage: " PROGRAM " [OPTIONS] FILE ...\n");
-4
View File
@@ -135,7 +135,6 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
if (errno != ENOSYS)
return -1;
switch_step++;
/* FALLTHROUGH */
#endif
#ifdef HAVE_UTIMENSAT
@@ -145,7 +144,6 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
if (errno != ENOSYS)
return -1;
switch_step++;
/* FALLTHROUGH */
#endif
#ifdef HAVE_LUTIMES
@@ -155,7 +153,6 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
if (errno != ENOSYS)
return -1;
switch_step++;
/* FALLTHROUGH */
#endif
#include "case_N.h"
@@ -165,7 +162,6 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
if (S_ISLNK(mode))
return 1;
}
/* FALLTHROUGH */
#include "case_N.h"
#ifdef HAVE_UTIMES
+2 -1
View File
@@ -885,9 +885,10 @@ int flush;
INITBITS();
state->mode = COPY_;
if (flush == Z_TREES) goto inf_leave;
/* FALLTHROUGH */
case COPY_:
state->mode = COPY;
/* FALL THROUGH */
/* FALLTHROUGH */
case COPY:
copy = state->length;
if (copy) {