Skip to content

Conversation

@copyrat90
Copy link
Contributor

@copyrat90 copyrat90 commented Sep 28, 2025

When you use #pragma once for your header file, and include that header as TEXTS := in your Makefile,
butano_fonts_tool.py will spit this warning:

include/texts.h:5:9: warning: '#pragma once' in main file [-Wpragma-once-outside-header]
    5 | #pragma once
      |         ^~~~

This is obviously a false positive.

And in my opinion, all warnings should be disabled for this text pre-processing phase, because you would get warnings on project build time anyways.

So, this commit silences all the warnings when process_texts_files() executes C preprocessor.

@laqieer laqieer requested a review from Copilot October 14, 2025 08:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR suppresses preprocessor warnings when processing text files that contain C/C++ headers by adding the -w flag to C preprocessor calls. The change addresses false positive warnings like #pragma once in main file warnings that occur during text preprocessing, since actual project warnings will be caught during the normal build process.

  • Added -w flag to suppress all warnings during C preprocessor execution
  • Applied the change to both DEVKITARM and WONDERFUL_TOOLCHAIN code paths

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@laqieer laqieer merged commit faf7e56 into laqieer:main Oct 14, 2025
1 check failed
@copyrat90 copyrat90 deleted the suppress-cpp-warnings branch October 14, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants