MantisBT - Doomseeker
View Issue Details
0003504Doomseeker[All Projects] Bugpublic2018-09-21 15:112018-10-06 18:19
WubTheCaptain 
WubTheCaptain 
normalminoralways
closedfixed 
amd64Debian GNU/Linuxbuster/sid
1.2 
1.21.2 
0003504: updaterevision: Implicit function declarations of popen(), pclose(), implicit int conversion
$ gcc -std=c99 tools/updaterevision/updaterevision.c
tools/updaterevision/updaterevision.c: In function ‘main’:
tools/updaterevision/updaterevision.c:65:11: warning: implicit declaration of function ‘popen’; did 
you mean ‘fopen’? [-Wimplicit-function-declaration]
  stream = popen("hg log --template \"{latesttag}-{latesttagdistance}-{node|short}\\n\" 
--rev . && hg log -r. --template \"{date|isodatesec}*{node}?{date|hgdate}\\n\" && 
hg identify -n", "r");
           ^~~~~
           fopen
tools/updaterevision/updaterevision.c:65:9: warning: assignment to ‘FILE *’ {aka ‘struct _IO_FILE 
*’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  stream = popen("hg log --template \"{latesttag}-{latesttagdistance}-{node|short}\\n\" 
--rev . && hg log -r. --template \"{date|isodatesec}*{node}?{date|hgdate}\\n\" && 
hg identify -n", "r");
         ^
tools/updaterevision/updaterevision.c:92:3: warning: implicit declaration of function ‘pclose’; did 
you mean ‘fclose’? [-Wimplicit-function-declaration]
   pclose(stream);
   ^~~~~~
   fclose
Caused by lack of #define _XOPEN_SOURCE 700 (or _POSIX_C_SOURCE >=2).

  1. libc6 2.27 (glibc)
  2. gcc-7 7.3.0 (GCC)
No tags attached.
patch 0001-updaterevision-Add-required-feature-test-macro-for-glibc.patch (1,108) 2018-09-21 15:28
https://zandronum.com/tracker/file_download.php?file_id=2402&type=bug
Issue History
2018-09-21 15:11WubTheCaptainNew Issue
2018-09-21 15:11WubTheCaptainStatusnew => assigned
2018-09-21 15:11WubTheCaptainAssigned To => WubTheCaptain
2018-09-21 15:28WubTheCaptainFile Added: 0001-updaterevision-Add-required-feature-test-macro-for-glibc.patch
2018-09-21 15:28WubTheCaptainStatusassigned => needs review
2018-09-21 15:31WubTheCaptainNote Added: 0019598
2018-09-21 17:32ZalewaNote Added: 0019600
2018-09-22 01:04WubTheCaptainStatusneeds review => resolved
2018-09-22 01:04WubTheCaptainResolutionopen => fixed
2018-09-22 01:04WubTheCaptainFixed in Version => 1.2
2018-10-06 18:19WubTheCaptainStatusresolved => closed

Notes
(0019598)
WubTheCaptain   
2018-09-21 15:31   
Patch by me, attached. Public domain.
(0019600)
Zalewa   
2018-09-21 17:32   
Merged:'https://bitbucket.org/Doomseeker/doomseeker/commits/bbf6a8bc671545a9153eb3b7196cfe425f86c7b0 [^]'