Skip to content

procinfo-ng: Add version 2.0.304 #521

Merged
merged 1 commit into from
Nov 1, 2017
Merged

procinfo-ng: Add version 2.0.304 #521

merged 1 commit into from
Nov 1, 2017

Conversation

thomas
Copy link
Collaborator

@thomas thomas commented Nov 1, 2017

The man page says:

procinfo gathers some system data from the /proc directory and
prints it nicely formatted on the standard output device.

IMHO it perfectly supplements the tools from procps-ng.

The man page says:

procinfo gathers some system data from the /proc directory and
prints it nicely formatted on the standard output device.

IMHO it perfectly supplements the tools from procps-ng.
@david david merged commit dd2acd0 into master Nov 1, 2017
@pmenzel
Copy link
Collaborator

pmenzel commented Nov 1, 2017

Just for the archive here are the GCC 7.2.0 and Clang 4.0.0 warnings. If somebody cares to report them upstream or even fix them.

GCC 7.2.0

[…]
[BEE] make -j62
g++ -g -O2 -pipe -Wall -s -lncurses procinfo.cpp -o procinfo
In file included from procinfo.cpp:44:0:
lib/timeRoutines.cpp: In function ‘const timeDiff __time_rel(const time_t&, const time_t&)’:
lib/timeRoutines.cpp:134:46: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::minutes’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                      ~~~~~~~~^~~~~~~
lib/timeRoutines.cpp:134:72: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::hours’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                                                ~~~~~~~~^~~~~
lib/timeRoutines.cpp:135:20: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::days’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   tm_wday: result1.days, tm_week: result1.weeks };
            ~~~~~~~~^~~~
lib/timeRoutines.cpp:135:43: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::weeks’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   tm_wday: result1.days, tm_week: result1.weeks };
                                   ~~~~~~~~^~~~~
lib/timeRoutines.cpp: In function ‘const timeDiff __time_rel(const double&, const double&)’:
lib/timeRoutines.cpp:141:46: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::minutes’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                      ~~~~~~~~^~~~~~~
lib/timeRoutines.cpp:141:72: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::hours’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                                                ~~~~~~~~^~~~~
lib/timeRoutines.cpp:142:20: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::days’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   tm_wday: result1.days, tm_week: result1.weeks };
            ~~~~~~~~^~~~
lib/timeRoutines.cpp:142:43: warning: narrowing conversion of ‘(uint32_t)result1.timeWDHMS::weeks’ from ‘uint32_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
   tm_wday: result1.days, tm_week: result1.weeks };
                                   ~~~~~~~~^~~~~
lib/timeRoutines.cpp: In function ‘const timeDiff structTM2structTD(tm)’:
lib/timeRoutines.cpp:185:17: warning: narrowing conversion of ‘input.tm::tm_sec’ from ‘int’ to ‘double’ inside { } [-Wnarrowing]
   tm_sec: input.tm_sec, tm_min: input.tm_min, tm_hour: input.tm_hour,
           ~~~~~~^~~~~~
In file included from procinfo.cpp:125:0:
diskStats.cpp: In function ‘std::vector<std::vector<std::__cxx11::basic_string<char> > > renderDiskStats(bool, bool, bool, double, const std::vector<diskStat_t>&)’:
diskStats.cpp:141:27: warning: ‘snprintf’ output truncated before the last format character [-Wformat-truncation=]
 vector< vector <string> > renderDiskStats(bool perSecond, bool showTotals, bool showSectors, double elapsed,
                           ^~~~~~~~~~~~~~~
diskStats.cpp:136:10: note: ‘snprintf’ output 40 or more bytes into a destination of size 39
  snprintf(output, 39, "%-4s %-34s", diskStat.name.c_str(), rendered.c_str());
  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from procinfo.cpp:70:0:
linux26_rendercpupagestat.cpp: In function ‘std::vector<std::vector<std::__cxx11::basic_string<char> > > renderCPUandPageStats(bool, bool, const double&, const uint64_t&, const uint64_t&, const std::vector<long unsigned int>&, const uint64_t&, const std::vector<long unsigned int>&)’:
linux26_rendercpupagestat.cpp:22:27: warning: ‘snprintf’ output truncated before the last format character [-Wformat-truncation=]
 vector< vector <string> > renderCPUandPageStats(bool perSecond, bool showTotals, const double &elapsed,
                           ^~~~~~~~~~~~~~~~~~~~~
In file included from procinfo.cpp:65:0:
rendercpupagestat.cpp:18:11: note: ‘snprintf’ output 3 bytes into a destination of size 2
   snprintf(fractionalSeconds, 2, "%2d", getFrac(cpuDiff / USER_HZ, 100));
   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[…]

Clang 4.0.0

[…]
[BEE] make -j62
clang++ -g -O2 -pipe -Wall -s -lncurses procinfo.cpp -o procinfo
In file included from procinfo.cpp:44:
./lib/timeRoutines.cpp:134:5: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                  ^~~~~~~
                  .tm_sec = 
./lib/timeRoutines.cpp:134:30: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                           ^~~~~~~
                                           .tm_min = 
./lib/timeRoutines.cpp:134:55: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                                                    ^~~~~~~~
                                                                    .tm_hour = 
./lib/timeRoutines.cpp:135:3: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: result1.days, tm_week: result1.weeks };
                ^~~~~~~~
                .tm_wday = 
./lib/timeRoutines.cpp:135:26: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: result1.days, tm_week: result1.weeks };
                                       ^~~~~~~~
                                       .tm_week = 
./lib/timeRoutines.cpp:141:5: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                  ^~~~~~~
                  .tm_sec = 
./lib/timeRoutines.cpp:141:30: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                           ^~~~~~~
                                           .tm_min = 
./lib/timeRoutines.cpp:141:55: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                { tm_sec: result1.seconds, tm_min: result1.minutes, tm_hour: result1.hours,
                                                                    ^~~~~~~~
                                                                    .tm_hour = 
./lib/timeRoutines.cpp:142:3: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: result1.days, tm_week: result1.weeks };
                ^~~~~~~~
                .tm_wday = 
./lib/timeRoutines.cpp:142:26: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: result1.days, tm_week: result1.weeks };
                                       ^~~~~~~~
                                       .tm_week = 
./lib/timeRoutines.cpp:152:29: warning: use of GNU old-style field designator extension [-Wgnu-designator]
        struct timeDiff result = { tm_sec: 0 };
                                   ^~~~~~~
                                   .tm_sec = 
./lib/timeRoutines.cpp:185:3: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_sec: input.tm_sec, tm_min: input.tm_min, tm_hour: input.tm_hour,
                ^~~~~~~
                .tm_sec = 
./lib/timeRoutines.cpp:185:25: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_sec: input.tm_sec, tm_min: input.tm_min, tm_hour: input.tm_hour,
                                      ^~~~~~~
                                      .tm_min = 
./lib/timeRoutines.cpp:185:47: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_sec: input.tm_sec, tm_min: input.tm_min, tm_hour: input.tm_hour,
                                                            ^~~~~~~~
                                                            .tm_hour = 
./lib/timeRoutines.cpp:186:3: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: input.tm_mday, tm_week: 0, tm_mon: input.tm_mon,
                ^~~~~~~~
                .tm_wday = 
./lib/timeRoutines.cpp:186:27: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: input.tm_mday, tm_week: 0, tm_mon: input.tm_mon,
                                        ^~~~~~~~
                                        .tm_week = 
./lib/timeRoutines.cpp:186:39: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_wday: input.tm_mday, tm_week: 0, tm_mon: input.tm_mon,
                                                    ^~~~~~~
                                                    .tm_mon = 
./lib/timeRoutines.cpp:187:3: warning: use of GNU old-style field designator extension [-Wgnu-designator]
                tm_year: input.tm_year
                ^~~~~~~~
                .tm_year = 
18 warnings generated.
[…]

@thomas
Copy link
Collaborator Author

thomas commented Nov 1, 2017

Paul, WOMBAT-Award!

The sourceforge page says 'Last Update: 2013-04-23', so actually its no surprise that a fresh gcc has something to quarrel. Also it's (IMHO) pretty pointless to paste all the clutter from a compiler if its always the same kind of warning.

@donald donald deleted the add-procinfo-ng branch December 1, 2017 15:30
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants