Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENGINES: Fix GCC warnings #3656

Merged
merged 1 commit into from Jan 12, 2022
Merged

ENGINES: Fix GCC warnings #3656

merged 1 commit into from Jan 12, 2022

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Jan 12, 2022

In file included from C:/Projects/scummvm/common/array.h:25,
                 from C:/Projects/scummvm/common/achievements.h:25,
                 from C:/Projects/scummvm/engines/metaengine.h:25,
                 from C:/Projects/scummvm/engines/advancedDetector.h:25,
                 from C:/Projects/scummvm/engines/sci/detection.cpp:22:
C:/Projects/scummvm/common/scummsys.h:400:44: warning: attribute ignored [-Wattributes]
  400 |                 #define WARN_UNUSED_RESULT [[nodiscard]]
      |                                            ^
C:/Projects/scummvm/engines/metaengine.h:565:16: note: in expansion of macro 'WARN_UNUSED_RESULT'
  565 |         static WARN_UNUSED_RESULT bool readSavegameHeader(Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail = true);
      |                ^~~~~~~~~~~~~~~~~~
C:/Projects/scummvm/common/scummsys.h:400:44: note: an attribute that appertains to a type-specifier is ignored
  400 |                 #define WARN_UNUSED_RESULT [[nodiscard]]
      |                                            ^
C:/Projects/scummvm/engines/metaengine.h:565:16: note: in expansion of macro 'WARN_UNUSED_RESULT'
  565 |         static WARN_UNUSED_RESULT bool readSavegameHeader(Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail = true);
      |                ^~~~~~~~~~~~~~~~~~

In file included from C:/Projects/scummvm/common/array.h:25,
                 from C:/Projects/scummvm/common/achievements.h:25,
                 from C:/Projects/scummvm/engines/metaengine.h:25,
                 from C:/Projects/scummvm/engines/advancedDetector.h:25,
                 from C:/Projects/scummvm/engines/sci/detection.cpp:22:
C:/Projects/scummvm/common/scummsys.h:400:44: warning: attribute ignored [-Wattributes]
  400 |                 #define WARN_UNUSED_RESULT [[nodiscard]]
      |                                            ^
C:/Projects/scummvm/engines/metaengine.h:565:16: note: in expansion of macro 'WARN_UNUSED_RESULT'
  565 |         static WARN_UNUSED_RESULT bool readSavegameHeader(Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail = true);
      |                ^~~~~~~~~~~~~~~~~~
C:/Projects/scummvm/common/scummsys.h:400:44: note: an attribute that appertains to a type-specifier is ignored
  400 |                 #define WARN_UNUSED_RESULT [[nodiscard]]
      |                                            ^
C:/Projects/scummvm/engines/metaengine.h:565:16: note: in expansion of macro 'WARN_UNUSED_RESULT'
  565 |         static WARN_UNUSED_RESULT bool readSavegameHeader(Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail = true);
      |                ^~~~~~~~~~~~~~~~~~
@bluegr
Copy link
Member

bluegr commented Jan 12, 2022

@bluegr bluegr merged commit eed2e93 into scummvm:master Jan 12, 2022
@orgads orgads deleted the nodiscard-warn branch January 12, 2022 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants