Details

    • 3
    • 4455

    Description

      newer gcc checks stricter about C99 VLA and set-but-unused variables.

      Attachments

        Activity

          [LU-1821] build errors with newer gcc
          bergwolf Peng Tao added a comment -

          I agree. I'll just abandon http://review.whamcloud.com/#change,3884 and reduce http://review.whamcloud.com/#change,3856 to just fix VLA error. There is no need to depend on patch from LU-1691 because VLA fix is independent. Thanks.

          bergwolf Peng Tao added a comment - I agree. I'll just abandon http://review.whamcloud.com/#change,3884 and reduce http://review.whamcloud.com/#change,3856 to just fix VLA error. There is no need to depend on patch from LU-1691 because VLA fix is independent. Thanks.

          Look at the LU-1691 patch and your two patches I would suggest the easiest path is to fold your changes into one patch and make it dependent on the patch from LU-1691 since they over lap. You are right your patch adds even more fixes that are needed beyond SLES11 SP2 support.

          simmonsja James A Simmons added a comment - Look at the LU-1691 patch and your two patches I would suggest the easiest path is to fold your changes into one patch and make it dependent on the patch from LU-1691 since they over lap. You are right your patch adds even more fixes that are needed beyond SLES11 SP2 support.
          bergwolf Peng Tao added a comment -

          LU-1691 doesn't address the VLA error. Shall I abandon this ticket (and the two patches) and let Yang Sheng fold the VLA part into http://review.whamcloud.com/#change,3734 ?

          bergwolf Peng Tao added a comment - LU-1691 doesn't address the VLA error. Shall I abandon this ticket (and the two patches) and let Yang Sheng fold the VLA part into http://review.whamcloud.com/#change,3734 ?

          This is the same problem we seen on SLES11 SP2. Please take a look at http://review.whamcloud.com/#change,3734 for jira ticket LU-1691. This is really a duplicate of that ticket.

          simmonsja James A Simmons added a comment - This is the same problem we seen on SLES11 SP2. Please take a look at http://review.whamcloud.com/#change,3734 for jira ticket LU-1691 . This is really a duplicate of that ticket.
          bergwolf Peng Tao added a comment -

          Another error after rebasing my code...

          make[3]: Entering directory `/home/bergwolf/src/linux-2.6'

          WARNING: Symbol version dump /home/bergwolf/src/linux-2.6/Module.symvers
          is missing; modules will have no dependencies and modversions.

          CC [M] /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.o
          cc1: warnings being treated as errors
          /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c: In function ‘osc_setup’:
          /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c:3581: error: ignoring return value of ‘PTR_ERR’, declared with attribute warn_unused_result

          $gcc --version
          gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
          Copyright (C) 2010 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

          patch submitted to
          http://review.whamcloud.com/3884

          bergwolf Peng Tao added a comment - Another error after rebasing my code... make [3] : Entering directory `/home/bergwolf/src/linux-2.6' WARNING: Symbol version dump /home/bergwolf/src/linux-2.6/Module.symvers is missing; modules will have no dependencies and modversions. CC [M] /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.o cc1: warnings being treated as errors /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c: In function ‘osc_setup’: /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c:3581: error: ignoring return value of ‘PTR_ERR’, declared with attribute warn_unused_result $gcc --version gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. patch submitted to http://review.whamcloud.com/3884
          bergwolf Peng Tao added a comment - patch submitted: http://review.whamcloud.com/3856
          bergwolf Peng Tao added a comment -

          VLA error:

          drivers/incore/fs_incore.c:340:54: error: variably modified
          ‘incore_dir_template’ at file scope [-Werror]

          $gcc --version
          gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
          Copyright (C) 2011 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

          bergwolf Peng Tao added a comment - VLA error: drivers/incore/fs_incore.c:340:54: error: variably modified ‘incore_dir_template’ at file scope [-Werror] $gcc --version gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

          People

            keith Keith Mannthey (Inactive)
            bergwolf Peng Tao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: