31 lines
900 B
Diff
31 lines
900 B
Diff
Fix -Werror=format (hard error in gcc-12)
|
|
|
|
Also the last leg is unreachable,
|
|
because when it's true, the second leg also true.
|
|
Index: tcptrack-1.4.3/src/TextUI.cc
|
|
===================================================================
|
|
--- tcptrack-1.4.3.orig/src/TextUI.cc
|
|
+++ tcptrack-1.4.3/src/TextUI.cc
|
|
@@ -308,12 +308,15 @@ void TextUI::drawui()
|
|
printw("RESET");
|
|
|
|
move(row,58);
|
|
- if( ic->getIdleSeconds() < 60 )
|
|
- printw("%ds",ic->getIdleSeconds());
|
|
- else if( ic->getIdleSeconds() > 59 )
|
|
- printw("%dm",ic->getIdleSeconds()/60);
|
|
- else if( ic->getIdleSeconds() > 3559 )
|
|
- printw("%dh",ic->getIdleSeconds()/3600);
|
|
+ {
|
|
+ long long int idle = ic->getIdleSeconds();
|
|
+ if( idle < 60 )
|
|
+ printw("%llds",idle);
|
|
+ else if( idle > 3559 )
|
|
+ printw("%lldh",idle/3600);
|
|
+ else if( idle > 59 )
|
|
+ printw("%lldm",idle/60);
|
|
+ }
|
|
|
|
move(row,63);
|
|
if( ic->activityToggle() )
|