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
abe165fe
Commit
abe165fe
authored
Jun 08, 2015
by
Hisham Muhammad
Browse files
Merge pull request #194 from eworm-de/warnings
fix compiler warnings
parents
2351fdea
08829cbc
Changes
3
Show whitespace changes
Inline
Side-by-side
TraceScreen.c
View file @
abe165fe
...
...
@@ -93,7 +93,8 @@ void TraceScreen_run(TraceScreen* this) {
execlp
(
"strace"
,
"strace"
,
"-p"
,
buffer
,
NULL
);
}
const
char
*
message
=
"Could not execute 'strace'. Please make sure it is available in your $PATH."
;
write
(
fdpair
[
1
],
message
,
strlen
(
message
));
ssize_t
written
=
write
(
fdpair
[
1
],
message
,
strlen
(
message
));
(
void
)
written
;
exit
(
1
);
}
fcntl
(
fdpair
[
0
],
F_SETFL
,
O_NONBLOCK
);
...
...
linux/LinuxProcessList.c
View file @
abe165fe
...
...
@@ -94,7 +94,8 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
int
cpus
=
-
1
;
do
{
cpus
++
;
fgets
(
buffer
,
255
,
file
);
char
*
s
=
fgets
(
buffer
,
255
,
file
);
(
void
)
s
;
}
while
(
String_startsWith
(
buffer
,
"cpu"
));
fclose
(
file
);
...
...
linux/Platform.c
View file @
abe165fe
...
...
@@ -110,7 +110,8 @@ int Platform_getMaxPid() {
FILE
*
file
=
fopen
(
PROCDIR
"/sys/kernel/pid_max"
,
"r"
);
if
(
!
file
)
return
-
1
;
int
maxPid
=
4194303
;
(
void
)
fscanf
(
file
,
"%32d"
,
&
maxPid
);
int
match
=
fscanf
(
file
,
"%32d"
,
&
maxPid
);
(
void
)
match
;
fclose
(
file
);
return
maxPid
;
}
...
...
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