Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-15492

Fix fallthrough decorator to use __attribute__((fallthrough)) for gcc 7

    XMLWordPrintable

Details

    • 3
    • 9223372036854775807

    Description

      Using the new fallthrough macro, building on openSUSE 15 with gcc-7.5

      error: this statement may fall through [-Werror=implicit-fallthrough=]

      Where the fallthrough attribute is available prefer it over a no-op suppression of
      the implicit fallthrough warning.

      Ex:

      # if defined(__GNUC__) && __GNUC__ >= 7
      #  define fallthrough  __attribute__((fallthrough)) /* fallthrough */
      # else
      #  define fallthrough do {} while (0)  /* fallthrough */
      # endif
      

      Attachments

        Activity

          People

            stancheff Shaun Tancheff
            stancheff Shaun Tancheff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: