Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`-Wunused-but-set-parameter` is only suppressed in Debug

オープン 初心者向け
#2,079 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
build-system

調査の方向性

include/godot_cpp/core/binder_common.hpp を編集: #if defined(DEBUG_ENABLED) ガードを #pragma GCC diagnostic push の周りから削除し、無条件の pop に一致するようにする。godot-cpp を -Wunused-but-set-parameter と -Werror で Release でビルドし、コンパイルすることを確認する。Release で警告が抑制されたとき完了。

索引モデルが issue の本文から書いたものです。

説明

Godot version

4.7.2-stable

godot-cpp version

10.0.0-stable

System information

Windows 11

Issue description

The file in question:
include/godot_cpp/core/binder_common.hpp

The issue is that when godot-cpp is built in Release with GCC with -Wunused-but-set-parameter, this parameter is not suppressed and with -Werror it fails to compile. Also, it seems like an inconsistent check, because #pragma push checks DEBUG_ENABLED, but #pragma pop doesn't.

Suggested fix:
Remove #if defined(DEBUG_ENABLED), so the warning suppression applies in Release too.

// GCC raises "parameter 'p_args' set but not used" when P = {},
// it's not clever enough to treat other P values as making this branch valid.
#if defined(DEBUG_ENABLED) && defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#endif

...

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
Steps to reproduce

Build godot-cpp in Release with -Wunused-but-set-parameter

Minimal reproduction project

N/A

主要言語
C++
スター
2.7k
フォーク
821
平均マージ
3日 18時間
マージ済み PR(30日)
15

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

godotengine/godot-cpp のほかの issue

godotengine/godot-cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。