The branch, master has been updated
       via  ad17b218 Silence fall-through warnings.
      from  a3668685 Avoid a potential out-of-bounds read in daemon mode if 
argc is 0.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ad17b2188958dabe2f957cde1357ae70f75d3bbd
Author: Wayne Davison <way...@samba.org>
Date:   Fri Jan 4 15:06:30 2019 -0800

    Silence fall-through warnings.

-----------------------------------------------------------------------

Summary of changes:
 acls.c         |  6 ++----
 case_N.h       | 16 ++++++++++++++++
 cleanup.c      |  7 -------
 hashtable.c    | 11 +++++++++++
 tls.c          |  2 +-
 util.c         |  4 ----
 zlib/inflate.c |  3 ++-
 7 files changed, 32 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/acls.c b/acls.c
index 8d97df63..7351ad68 100644
--- a/acls.c
+++ b/acls.c
@@ -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));
diff --git a/case_N.h b/case_N.h
index a21cf94d..f15d1d60 100644
--- a/case_N.h
+++ b/case_N.h
@@ -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!
diff --git a/cleanup.c b/cleanup.c
index 95595f10..c3ae7999 100644
--- a/cleanup.c
+++ b/cleanup.c
@@ -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++;
 
diff --git a/hashtable.c b/hashtable.c
index 2d06a66e..2fc2310a 100644
--- a/hashtable.c
+++ b/hashtable.c
@@ -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;
diff --git a/tls.c b/tls.c
index 4ffca33e..0d5b7a4a 100644
--- a/tls.c
+++ b/tls.c
@@ -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");
diff --git a/util.c b/util.c
index 8723248f..72b3944f 100644
--- a/util.c
+++ b/util.c
@@ -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
diff --git a/zlib/inflate.c b/zlib/inflate.c
index cea8e7e4..5ed2390d 100644
--- a/zlib/inflate.c
+++ b/zlib/inflate.c
@@ -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) {


-- 
The rsync repository.

_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to