Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
fbb4c49e
Commit
fbb4c49e
authored
Oct 05, 2015
by
Hisham Muhammad
Browse files
gcc warning cleanups.
parent
bf276a09
Changes
2
Hide whitespace changes
Inline
Side-by-side
CRT.c
View file @
fbb4c49e
...
...
@@ -552,7 +552,7 @@ void CRT_init(int delay, int colorScheme) {
CRT_colorScheme
=
colorScheme
;
for
(
int
i
=
0
;
i
<
LAST_COLORELEMENT
;
i
++
)
{
int
color
=
CRT_colorSchemes
[
COLORSCHEME_DEFAULT
][
i
];
unsigned
int
color
=
CRT_colorSchemes
[
COLORSCHEME_DEFAULT
][
i
];
CRT_colorSchemes
[
COLORSCHEME_BROKENGRAY
][
i
]
=
color
==
(
A_BOLD
|
ColorPair
(
Black
,
Black
))
?
ColorPair
(
White
,
Black
)
:
color
;
}
...
...
htop.c
View file @
fbb4c49e
...
...
@@ -108,7 +108,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
}
flags
.
sortKey
=
ColumnsPanel_fieldNameToIndex
(
optarg
);
if
(
flags
.
sortKey
==
-
1
)
{
errx
(
1
,
stderr
,
"Error: invalid column
\"
%s
\"
.
\n
"
,
optarg
);
fprintf
(
stderr
,
"Error: invalid column
\"
%s
\"
.
\n
"
,
optarg
);
}
break
;
case
'd'
:
...
...
@@ -116,12 +116,12 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
if
(
flags
.
delay
<
1
)
flags
.
delay
=
1
;
if
(
flags
.
delay
>
100
)
flags
.
delay
=
100
;
}
else
{
errx
(
1
,
stderr
,
"Error: invalid delay value
\"
%s
\"
.
\n
"
,
optarg
);
fprintf
(
stderr
,
"Error: invalid delay value
\"
%s
\"
.
\n
"
,
optarg
);
}
break
;
case
'u'
:
if
(
!
Action_setUserOnly
(
optarg
,
&
(
flags
.
userId
)))
{
errx
(
1
,
stderr
,
"Error: invalid user
\"
%s
\"
.
\n
"
,
optarg
);
fprintf
(
stderr
,
"Error: invalid user
\"
%s
\"
.
\n
"
,
optarg
);
}
break
;
case
'C'
:
...
...
@@ -176,7 +176,7 @@ int main(int argc, char** argv) {
#ifdef HAVE_PROC
if
(
access
(
PROCDIR
,
R_OK
)
!=
0
)
{
errx
(
1
,
"Error: could not read procfs (compiled to look in %s).
\n
"
,
PROCDIR
);
fprintf
(
"Error: could not read procfs (compiled to look in %s).
\n
"
,
PROCDIR
);
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment