]> sourceware.org Git - systemtap.git/commitdiff
runtime/tapset: gcc9 /*fallthrough*/ pass
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 12 Nov 2019 16:31:09 +0000 (16:31 +0000)
committerFrank Ch. Eigler <fche@redhat.com>
Tue, 12 Nov 2019 16:31:09 +0000 (16:31 +0000)
Mark up a few more locations where gcc9 on fedora rawhide has
had a cow about intentional fallthroughs in switch/case statements.

runtime/syscall.h
runtime/unwind.c
runtime/unwind/unwind.h
tapset/linux/aux_syscalls.stp

index bccd6f65c80cc1e11d2506e04238154394a66253..8a1566afee4f6d9dc269e676348ae36abc6a20a2 100644 (file)
@@ -351,18 +351,23 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
                case 0:
                        if (!n--) break;
                        *args++ = regs->bx;
+                       /* fallthrough */
                case 1:
                        if (!n--) break;
                        *args++ = regs->cx;
+                       /* fallthrough */
                case 2:
                        if (!n--) break;
                        *args++ = regs->dx;
+                       /* fallthrough */
                case 3:
                        if (!n--) break;
                        *args++ = regs->si;
+                       /* fallthrough */
                case 4:
                        if (!n--) break;
                        *args++ = regs->di;
+                       /* fallthrough */
                case 5:
                        if (!n--) break;
                        *args++ = regs->bp;
@@ -370,18 +375,23 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
                case 0:
                        if (!n--) break;
                        *args++ = regs->rbx;
+                       /* fallthrough */
                case 1:
                        if (!n--) break;
                        *args++ = regs->rcx;
+                       /* fallthrough */
                case 2:
                        if (!n--) break;
                        *args++ = regs->rdx;
+                       /* fallthrough */
                case 3:
                        if (!n--) break;
                        *args++ = regs->rsi;
+                       /* fallthrough */
                case 4:
                        if (!n--) break;
                        *args++ = regs->rdi;
+                       /* fallthrough */
                case 5:
                        if (!n--) break;
                        *args++ = regs->rbp;
@@ -395,18 +405,23 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
        case 0:
                if (!n--) break;
                *args++ = regs->di;
+               /* fallthrough */
        case 1:
                if (!n--) break;
                *args++ = regs->si;
+               /* fallthrough */
        case 2:
                if (!n--) break;
                *args++ = regs->dx;
+               /* fallthrough */
        case 3:
                if (!n--) break;
                *args++ = regs->r10;
+               /* fallthrough */
        case 4:
                if (!n--) break;
                *args++ = regs->r8;
+               /* fallthrough */
        case 5:
                if (!n--) break;
                *args++ = regs->r9;
@@ -414,18 +429,23 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
        case 0:
                if (!n--) break;
                *args++ = regs->rdi;
+               /* fallthrough */
        case 1:
                if (!n--) break;
                *args++ = regs->rsi;
+               /* fallthrough */
        case 2:
                if (!n--) break;
                *args++ = regs->rdx;
+               /* fallthrough */
        case 3:
                if (!n--) break;
                *args++ = regs->r10;
+               /* fallthrough */
        case 4:
                if (!n--) break;
                *args++ = regs->r8;
+               /* fallthrough */
        case 5:
                if (!n--) break;
                *args++ = regs->r9;
@@ -555,23 +575,30 @@ static inline void _stp_syscall_get_arguments(struct task_struct *task,
                case 6:
                        if (!n--) break;
                        *args++ = regs->r13;
+                       /* fallthrough */
                case 5:
                        if (!n--) break;
                        *args++ = regs->r15;
+                       /* fallthrough */
                case 4:
                        if (!n--) break;
                        *args++ = regs->r14;
+                       /* fallthrough */
                case 3:
                        if (!n--) break;
                        *args++ = regs->r10;
+                       /* fallthrough */
                case 2:
                        if (!n--) break;
                        *args++ = regs->r9;
+                       /* fallthrough */
                case 1:
                        if (!n--) break;
                        *args++ = regs->r11;
+                       /* fallthrough */
                case 0:
                        if (!n--) break;
+                       /* fallthrough */
                default:
                        BUG();
                        break;
@@ -603,18 +630,23 @@ _stp_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
        case 0:
                if (!n--) break;
                *args++ = regs->orig_gpr2 & mask;
+               /* fallthrough */
        case 1:
                if (!n--) break;
                *args++ = regs->gprs[3] & mask;
+               /* fallthrough */
        case 2:
                if (!n--) break;
                *args++ = regs->gprs[4] & mask;
+               /* fallthrough */
        case 3:
                if (!n--) break;
                *args++ = regs->gprs[5] & mask;
+               /* fallthrough */
        case 4:
                if (!n--) break;
                *args++ = regs->gprs[6] & mask;
+               /* fallthrough */
        case 5:
                if (!n--) break;
                *args++ = regs->args[0] & mask;
index 40ff3998d2b773b688528ec6126f724b7bc43524..06b56df64a8317f7f41928aa2cd539348810fc04 100644 (file)
@@ -527,7 +527,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc,
                                        REG_STATE.cfa.reg = value;
                                        dbug_unwind(1, "DW_CFA_def_cfa reg=%ld\n", REG_STATE.cfa.reg);
                                }
-                               /*nobreak */
+                               /* fallthrough */
                        case DW_CFA_def_cfa_offset:
                                if (REG_STATE.cfa_is_expr != 0) {
                                        _stp_warn("Unexpected DW_CFA_def_cfa_offset\n");
@@ -549,7 +549,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc,
                                                    value, DWARF_REG_MAP(value));
                                        REG_STATE.cfa.reg = value;
                                }
-                               /*nobreak */
+                               /* fallthrough */
                        case DW_CFA_def_cfa_offset_sf:
                                if (REG_STATE.cfa_is_expr != 0) {
                                        _stp_warn("Unexpected DW_CFA_def_cfa_offset_sf\n");
index b3ff7869f4ee3396bdd3e0054b9a3293a7f800aa..cb206bd5a3ed8551a5f7e570608ddd21906d6b87 100644 (file)
@@ -154,12 +154,13 @@ static unsigned long read_ptr_sect(const u8 **pLoc, const void *end,
                                value = _stp_get_unaligned(ptr.p32u++);
                        break;
                }
+               /* fallthrough */
        case DW_EH_PE_data8:
                BUILD_BUG_ON(sizeof(u64) != sizeof(value));
 #else
                BUILD_BUG_ON(sizeof(u32) != sizeof(value));
 #endif
-       /* fallthrough, see above. */
+               /* fallthrough, see above. */
        case DW_EH_PE_absptr:
                if (compat_task)
                {
index f7e76eb2c9f0cb66d4ffb3a04470608cec59b053..3e7e464f5f731cd14c6033d77bfe10f43bb206c6 100644 (file)
@@ -131,8 +131,11 @@ sigset_from_compat(sigset_t *set, compat_sigset_t *compat)
 {
        switch (_NSIG_WORDS) {
        case 4: set->sig[3] = compat->sig[6] | (((long)compat->sig[7]) << 32 );
+         /*fallthrough*/
        case 3: set->sig[2] = compat->sig[4] | (((long)compat->sig[5]) << 32 );
+         /*fallthrough*/
        case 2: set->sig[1] = compat->sig[2] | (((long)compat->sig[3]) << 32 );
+         /*fallthrough*/
        case 1: set->sig[0] = compat->sig[0] | (((long)compat->sig[1]) << 32 );
        }
 }
@@ -3599,10 +3602,13 @@ function _struct_sigaction32_u:string(uaddr:long)
            {
            case 4: act.sa_mask.sig[3] = act32.sa_mask.sig[6]
                | (((long)act32.sa_mask.sig[7]) << 32);
+             /* fallthrough */
            case 3: act.sa_mask.sig[2] = act32.sa_mask.sig[4]
                | (((long)act32.sa_mask.sig[5]) << 32);
+             /* fallthrough */
            case 2: act.sa_mask.sig[1] = act32.sa_mask.sig[2]
                | (((long)act32.sa_mask.sig[3]) << 32);
+             /* fallthrough */
            case 1: act.sa_mask.sig[0] = act32.sa_mask.sig[0]
                | (((long)act32.sa_mask.sig[1]) << 32);
            }
This page took 0.038077 seconds and 5 git commands to generate.