MantisBT - Doomseeker |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0003820 | Doomseeker | [All Projects] Bug | public | 2020-06-07 08:05 | 2021-08-16 19:12 |
|
Reporter | WubTheCaptain | |
Assigned To | Zalewa | |
Priority | low | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 1.3.1 | |
Target Version | 1.3.2 | Fixed in Version | 1.3.2 | |
|
Summary | 0003820: src/core/scanner.cpp uses <cstdarg> macros without including the header |
Description | Somehow magically, src/core/scanner.cpp compiles on my machine (when it shouldn't) without #include <cstdarg>. |
Steps To Reproduce | $ grep "va_" src/core/scanner.{cpp,h} | wc -l
6
$ grep "<cstdarg>" src/core/scanner.{cpp,h} | wc -l
0
$ grep "stdarg.h" src/core/scanner.{cpp,h} | wc -l
0
Quote from src/core/scanner.cpp
#include <cmath>
#include <cstdio>
#include <cstdlib> |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 0001-Scanner-scriptMessage-Add-missing-cstdarg-header.patch (940) 2020-06-07 18:32 https://zandronum.com/tracker/file_download.php?file_id=2608&type=bug 0002-scanner.h-Include-the-missing-cstdarg-header.patch (724) 2020-06-08 05:53 https://zandronum.com/tracker/file_download.php?file_id=2609&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2020-06-07 08:05 | WubTheCaptain | New Issue | |
2020-06-07 08:11 | WubTheCaptain | Note Added: 0021369 | |
2020-06-07 18:32 | WubTheCaptain | File Added: 0001-Scanner-scriptMessage-Add-missing-cstdarg-header.patch | |
2020-06-07 18:32 | WubTheCaptain | Assigned To | => WubTheCaptain |
2020-06-07 18:32 | WubTheCaptain | Status | new => needs review |
2020-06-07 18:33 | WubTheCaptain | Target Version | => 1.3.3 |
2020-06-08 02:07 | Blzut3 | Note Added: 0021412 | |
2020-06-08 05:48 | WubTheCaptain | Status | needs review => assigned |
2020-06-08 05:53 | WubTheCaptain | File Added: 0002-scanner.h-Include-the-missing-cstdarg-header.patch | |
2020-06-08 05:54 | WubTheCaptain | Note Added: 0021424 | |
2020-06-08 05:54 | WubTheCaptain | Status | assigned => needs review |
2020-06-08 05:54 | WubTheCaptain | Assigned To | WubTheCaptain => Blzut3 |
2020-06-08 11:53 | Zalewa | Note Added: 0021429 | |
2020-06-08 13:54 | WubTheCaptain | Status | needs review => resolved |
2020-06-08 13:54 | WubTheCaptain | Fixed in Version | => 1.3.3 |
2020-06-08 13:54 | WubTheCaptain | Resolution | open => fixed |
2020-06-08 13:54 | WubTheCaptain | Assigned To | Blzut3 => Zalewa |
2021-08-07 16:52 | Blzut3 | Status | resolved => closed |
2021-08-16 19:12 | WubTheCaptain | Fixed in Version | 1.3.3 => 1.3.2 |
2021-08-16 19:12 | WubTheCaptain | Target Version | 1.3.3 => 1.3.2 |
Notes |
|
|
It may be because src/core/plugins/engineplugin.cpp includes <cstdarg> and CMake compiles the whole project, thus it ends up linking that way. |
|
|
(0021412)
|
Blzut3
|
2020-06-08 02:07
|
|
scanner.h references va_list so wouldn't this also be technically needed there as well?
It links because it's part of the standard library so hard for it not to link. As for why it compiles, one of the other headers must include it. stdarg is common enough that it's not uncommon for the lack of the include to go unnoticed. |
|
|
|
Good catch!
I could use <cstdarg> in only scanner.h, but I think this... makes more sense. Patch attached. |
|
|
(0021429)
|
Zalewa
|
2020-06-08 11:53
|
|
|