Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003820Doomseeker[All Projects] Bugpublic2020-06-07 08:052021-08-16 19:12
ReporterWubTheCaptain 
Assigned ToZalewa 
PrioritylowSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.3.1 
Target Version1.3.2Fixed in Version1.3.2 
Summary0003820: src/core/scanner.cpp uses <cstdarg> macros without including the header
DescriptionSomehow 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>
Attached Filespatch file icon 0001-Scanner-scriptMessage-Add-missing-cstdarg-header.patch [^] (940 bytes) 2020-06-07 18:32 [Show Content]
patch file icon 0002-scanner.h-Include-the-missing-cstdarg-header.patch [^] (724 bytes) 2020-06-08 05:53 [Show Content]

- Relationships

-  Notes
User avatar (0021369)
WubTheCaptain (reporter)
2020-06-07 08:11

It may be because src/core/plugins/engineplugin.cpp includes <cstdarg> and CMake compiles the whole project, thus it ends up linking that way.
User avatar (0021412)
Blzut3 (administrator)
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.
User avatar (0021424)
WubTheCaptain (reporter)
2020-06-08 05:54

Good catch!

I could use <cstdarg> in only scanner.h, but I think this... makes more sense. Patch attached.
User avatar (0021429)
Zalewa (developer)
2020-06-08 11:53

I merged the 2nd patch only as this should be sufficient:
'https://bitbucket.org/Doomseeker/doomseeker/commits/20a745b11ce1721b709eaa6ba5943ff0f123f85c [^]'

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- 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






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker