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

gcc 13 stricter enum checking

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      gcc 13 does stricter enum enforcement

      lustre_msg_check_version:

      /home/shaun/lustre-release/lustre/ptlrpc/pack_generic.c:81:5: error: conflicting types for ‘lustre_msg_check_version’ due to enum/integer mismatch; have ‘int(struct lustre_msg_v2 *, enum lustre_msg_version)’ [-Werror=enum-int-mismatch]
         81 | int lustre_msg_check_version(struct lustre_msg *msg,
            |     ^~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/shaun/lustre-release/lustre/ptlrpc/pack_generic.c:48:
      /home/shaun/lustre-release/lustre/include/lustre_net.h:2293:5: note: previous declaration of ‘lustre_msg_check_version’ with type ‘int(struct lustre_msg_v2 *, __u32)’ {aka ‘int(struct lustre_msg_v2 *, unsigned int)’}
       2293 | int lustre_msg_check_version(struct lustre_msg *msg, __u32 version);
            |     ^~~~~~~~~~~~~~~~~~~~~~~~
      /home/shaun/lustre-release/lustre/ptlrpc/pack_generic.c:858:20: error: conflicting types for ‘lustre_msghdr_get_flags’ due to enum/integer mismatch; have ‘enum lustre_msghdr(struct lustre_msg_v2 *)’ [-Werror=enum-int-mismatch]
        858 | enum lustre_msghdr lustre_msghdr_get_flags(struct lustre_msg *msg)
            |                    ^~~~~~~~~~~~~~~~~~~~~~~
      /home/shaun/lustre-release/lustre/include/lustre_net.h:2321:7: note: previous declaration of ‘lustre_msghdr_get_flags’ with type ‘__u32(struct lustre_msg_v2 *)’ {aka ‘unsigned int(struct lustre_msg_v2 *)’}
       2321 | __u32 lustre_msghdr_get_flags(struct lustre_msg *msg);
            |       ^~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make[6]: *** [scripts/Makefile.build:299: /home/shaun/lustre-release/lustre/ptlrpc/pack_generic.o] Error 1
      

      llapi_layout_comp_use

      liblustreapi_layout.c:2141:5: error: conflicting types for ‘llapi_layout_comp_use’ due to enum/integer mismatch; have ‘int(struct llapi_layout *, enum llapi_layout_comp_use)’ [-Werror=enum-int-mismatch]
       2141 | int llapi_layout_comp_use(struct llapi_layout *layout,
            |     ^~~~~~~~~~~~~~~~~~~~~
      In file included from liblustreapi_layout.c:44:
      /home/shaun/lustre-release/lustre/include/lustre/lustreapi.h:1249:5: note: previous declaration of ‘llapi_layout_comp_use’ with type ‘int(struct llapi_layout *, uint32_t)’ {aka ‘int(struct llapi_layout *, unsigned int)’}
       1249 | int llapi_layout_comp_use(struct llapi_layout *layout, uint32_t pos);
            |     ^~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: