MantisBT - Doomseeker
View Issue Details
0003497Doomseeker[All Projects] Bugpublic2018-09-18 21:322018-10-06 18:19
WubTheCaptain 
WubTheCaptain 
normalminoralways
closedfixed 
amd64OpenBSD6.4-current
1.2 
1.21.2 
0003497: updaterevision: Printing HG_REVISION_NUMBER uses incorrect typedef formatting for hgdate
[  0%] Building C object tools/updaterevision/CMakeFiles/updaterevision.dir/updaterevision.c.o

/home/doomseeker/.local/src/doomseeker/tools/updaterevision/updaterevision.c:161:56: warning: 
      format specifies type 'unsigned long' but the argument has type 'time_t'
      (aka 'long long') [-Wformat]
                fprintf (stream, "#define HG_REVISION_NUMBER %lu\n", hgdate);
                                                             ~~~     ^~~~~~
                                                             %lld
1 warning generated.
cmake and gmake the source with appropriate packages installed. Clang 6.0.0.
Introduced into code with ticket 0003386, commit eb2a08c6a03d23ab9aca8c894dd115dbbe60d7d2.
No tags attached.
related to 0003386closed Blzut3 updaterevision: gcc compiler warns of tempnam usage, recommends mkstemp 
patch 0001-updaterevision-Fix-HG_REVISION_NUMBER-format-type.patch (1,026) 2018-09-18 21:40
https://zandronum.com/tracker/file_download.php?file_id=2392&type=bug
patch 0001-updaterevision-Fix-hgdate-data-type-to-signed-64-bit-int.patch (999) 2018-09-21 15:00
https://zandronum.com/tracker/file_download.php?file_id=2401&type=bug
Issue History
2018-09-18 21:32WubTheCaptainNew Issue
2018-09-18 21:33WubTheCaptainAssigned To => WubTheCaptain
2018-09-18 21:33WubTheCaptainStatusnew => assigned
2018-09-18 21:40WubTheCaptainFile Added: 0001-updaterevision-Fix-HG_REVISION_NUMBER-format-type.patch
2018-09-18 21:40WubTheCaptainStatusassigned => needs review
2018-09-18 21:41WubTheCaptainNote Added: 0019548
2018-09-18 21:42WubTheCaptainProduct Version => 1.2
2018-09-18 21:45WubTheCaptainAdditional Information Updatedbug_revision_view_page.php?rev_id=11820#r11820
2018-09-18 21:45WubTheCaptainRelationship addedrelated to 0003386
2018-09-20 17:00ZalewaNote Added: 0019585
2018-09-21 14:52WubTheCaptainStatusneeds review => assigned
2018-09-21 15:00WubTheCaptainFile Added: 0001-updaterevision-Fix-hgdate-data-type-to-signed-64-bit-int.patch
2018-09-21 15:00WubTheCaptainNote Added: 0019597
2018-09-21 15:00WubTheCaptainStatusassigned => needs review
2018-09-21 17:21ZalewaNote Added: 0019599
2018-09-21 17:21ZalewaNote Edited: 0019599bug_revision_view_page.php?bugnote_id=19599#r11881
2018-09-22 01:05WubTheCaptainNote Added: 0019603
2018-09-22 01:05WubTheCaptainStatusneeds review => needs testing
2018-09-22 01:24WubTheCaptainTarget Version => 1.2
2018-09-22 01:29WubTheCaptainNote Added: 0019608
2018-09-22 01:29WubTheCaptainStatusneeds testing => resolved
2018-09-22 01:29WubTheCaptainFixed in Version => 1.2
2018-09-22 01:29WubTheCaptainResolutionopen => fixed
2018-10-06 18:19WubTheCaptainStatusresolved => closed

Notes
(0019548)
WubTheCaptain   
2018-09-18 21:41   
Patch by me, attached. Tested on GNU/Linux.
(0019585)
Zalewa   
2018-09-20 17:00   
Perhaps to ensure that time_t type fits %lld, it also should be cast to (long long) in that printf() statement?
(0019597)
WubTheCaptain   
2018-09-21 15:00   
Good idea Zalewa. 0001-updaterevision-Fix-hgdate-data-type-to-signed-64-bit-int.patch
(0019599)
Zalewa   
2018-09-21 17:21   
Merged your patch:'https://bitbucket.org/Doomseeker/doomseeker/commits/c9c0b4dfe5db98a4a64c8239fd5a3ada431b1eb2 [^]'

Feel free to resolve this ticket at your leisure.

(0019603)
WubTheCaptain   
2018-09-22 01:05   
Needs testing on OpenBSD.
(0019608)
WubTheCaptain   
2018-09-22 01:29   
All good on both Debian GNU/Linux and OpenBSD. An unrelated strcpy() issue has ticket 0003498.