CYGWIN: GCC prints "defined but not used" warnings on mimalloc
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie in Objects/mimalloc/prim/unix/prim.c und prüfen Sie den vorhandenen bedingten Block, der dazu gedacht ist, Warnungen über nicht verwendete Funktionen auf ausgewählten Plattformen zu unterdrücken. Überprüfen Sie die Plattformliste und führen Sie einen Cygwin-Build durch, um zu bestätigen, dass die vier Warnungen nicht mehr auftreten; der verknüpfte PR gh-146599 zeigt, dass die Arbeit bereits im Gange ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c
- Bereich
- operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 25/100