CYGWIN: GCC prints "defined but not used" warnings on mimalloc
オープン
まだ誰も着手していません。
build
dependencies
interpreter-core
OS-unsupported
triaged
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
Compiling under CYGWIN prints these warning messages:
In file included from ../cpython/Objects/mimalloc/prim/prim.c:22,
from ../cpython/Objects/mimalloc/static.c:37,
from ../cpython/Objects/obmalloc.c:23:
../cpython/Objects/mimalloc/prim/unix/prim.c:91:12: warning: ‘mi_prim_access’ defined but not used [-Wunused-function]
91 | static int mi_prim_access(const char *fpath, int mode) {
| ^~~~~~~~~~~~~~
../cpython/Objects/mimalloc/prim/unix/prim.c:88:12: warning: ‘mi_prim_close’ defined but not used [-Wunused-function]
88 | static int mi_prim_close(int fd) {
| ^~~~~~~~~~~~~
../cpython/Objects/mimalloc/prim/unix/prim.c:85:16: warning: ‘mi_prim_read’ defined but not used [-Wunused-function]
85 | static ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
| ^~~~~~~~~~~~
../cpython/Objects/mimalloc/prim/unix/prim.c:82:12: warning: ‘mi_prim_open’ defined but not used [-Wunused-function]
82 | static int mi_prim_open(const char* fpath, int open_flags) {
| ^~~~~~~~~~~~
Looking into the code of Objects/mimalloc/prim/unix/prim.c, there is already a conditional block to avoid the generation of such warnings.
The solution for this issue is to simply add CYGWIN to that list of platforms.
So, I'm posting this issue according to the suggestion received into #146572 for tracking this change.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
- gh-146599
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Objects/mimalloc/prim/unix/prim.c から始め、選択したプラットフォームで未使用の関数に関する警告を抑制するための既存の条件ブロックを確認してください。プラットフォームの一覧を検証し、Cygwin ビルドを実行して4つの警告が表示されなくなったことを確認してください。リンクされている PR gh-146599 は、すでに作業が進行中であることを示しています。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c
- 領域
- operating-systems
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 25/100