Ignore:
Timestamp:
2017-05-04T22:12:27Z (7 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e141281
Parents:
93ad8166
Message:

add standardized case fallthrough comment annotations, add actual missing breaks

GCC 7.1's attribute((fallthrough)) would be more elegant, but unfortunatelly this annotation is incompatible with previous versions of GCC (it generates an empty declaration error)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/printf_core.c

    r93ad8166 rdc12262  
    12171217        case 'F':
    12181218                flags |= __PRINTF_FLAG_BIGCHARS;
    1219                 /* Fall through.*/
     1219                /* Fallthrough */
    12201220        case 'f':
    12211221                precision = (precision < 0) ? 6 : precision;
     
    12241224        case 'E':
    12251225                flags |= __PRINTF_FLAG_BIGCHARS;
    1226                 /* Fall through.*/
     1226                /* Fallthrough */
    12271227        case 'e':
    12281228                precision = (precision < 0) ? 6 : precision;
     
    12311231        case 'G':
    12321232                flags |= __PRINTF_FLAG_BIGCHARS;
    1233                 /* Fall through.*/
     1233                /* Fallthrough */
    12341234        case 'g':
    12351235                return print_double_generic(g, precision, width, flags, ps);
     
    15531553                                /* Pointer */
    15541554                                flags |= __PRINTF_FLAG_BIGCHARS;
     1555                                /* Fallthrough */
    15551556                        case 'p':
    15561557                                flags |= __PRINTF_FLAG_PREFIX;
     
    15681569                        case 'i':
    15691570                                flags |= __PRINTF_FLAG_SIGNED;
     1571                                /* Fallthrough */
    15701572                        case 'u':
    15711573                                break;
    15721574                        case 'X':
    15731575                                flags |= __PRINTF_FLAG_BIGCHARS;
     1576                                /* Fallthrough */
    15741577                        case 'x':
    15751578                                base = 16;
Note: See TracChangeset for help on using the changeset viewer.