Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
compctl-kam
Commits
f26e010b
Commit
f26e010b
authored
Mar 16, 2012
by
Petr Baudis
Browse files
Enable more warnings and fix few sign-related situations
parent
982e5a65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
f26e010b
CFLAGS
=
-Wall
-O3
-std
=
gnu99
-ggdb3
CFLAGS
=
-Wall
-Wextra
-Wno-unused
-O3
-std
=
gnu99
-ggdb3
all
:
compctld compctl
...
...
compctl.c
View file @
f26e010b
...
...
@@ -54,7 +54,7 @@ daemon_chat(char *cmd)
perror
(
"sendmsg"
);
exit
(
EXIT_FAILURE
);
}
if
(
sent
<
msg
.
msg_iov
->
iov_len
)
{
if
(
(
size_t
)
sent
<
msg
.
msg_iov
->
iov_len
)
{
fprintf
(
stderr
,
"incomplete send %zd < %zu, FIXME
\n
"
,
sent
,
msg
.
msg_iov
->
iov_len
);
exit
(
EXIT_FAILURE
);
}
...
...
compctld.c
View file @
f26e010b
...
...
@@ -47,8 +47,8 @@ memory_limits(size_t *minuser, size_t *mincomp, size_t *maxcomp, size_t *total)
*
minuser
=
static_maxfree
;
*
mincomp
=
static_minfree
;
*
maxcomp
=
*
total
-
*
minuser
;
if
(
*
maxcomp
<
0
)
*
maxcomp
=
0
;
ssize_t
s
maxcomp
=
*
total
-
*
minuser
;
*
maxcomp
=
smaxcomp
>
0
?
s
maxcomp
:
0
;
/* maxcomp < mincomp may happen; they are used in different
* settings. */
}
...
...
@@ -101,7 +101,7 @@ mprintf(int fd, char *fmt, ...)
logperror
(
"sendmsg"
);
return
;
}
if
(
sent
<
iov
.
iov_len
)
{
if
(
(
size_t
)
sent
<
iov
.
iov_len
)
{
syslog
(
LOG_INFO
,
"incomplete send %zd < %zu, FIXME"
,
sent
,
iov
.
iov_len
);
return
;
}
...
...
Write
Preview
Supports
Markdown
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