From: Pavel Roskin <proski@gnu.org>
To: git <git@vger.kernel.org>
Subject: [PATCH] Fix gcc-4 warning in accept() call
Date: Thu, 29 Sep 2005 17:05:01 -0400 [thread overview]
Message-ID: <1128027901.24397.57.camel@dv> (raw)
Fix gcc-4 warning in accept() call
gcc-4 warns about sign mismatch in pointers. Third argument in accept()
is socklen_t, which is unsigned. Since Linus doesn't like socklen_t
(see commit 7fa090844f7d1624c7d1ffc621aae6aec84a1110), let's use
unsigned int.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/daemon.c b/daemon.c
--- a/daemon.c
+++ b/daemon.c
@@ -459,7 +459,7 @@ static int serve(int port)
if (FD_ISSET(sockfd, &fds)) {
struct sockaddr_storage ss;
- int sslen = sizeof(ss);
+ unsigned int sslen = sizeof(ss);
int incoming = accept(sockfd, (struct sockaddr *)&ss, &sslen);
if (incoming < 0) {
switch (errno) {
--
Regards,
Pavel Roskin
next reply other threads:[~2005-09-29 21:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 21:05 Pavel Roskin [this message]
2005-09-29 23:11 ` [PATCH] Fix gcc-4 warning in accept() call Horst von Brand
2005-09-30 4:09 ` Pavel Roskin
2005-09-30 4:46 ` H. Peter Anvin
2005-09-30 5:49 ` Junio C Hamano
2005-09-30 5:53 ` H. Peter Anvin
2005-09-30 5:58 ` H. Peter Anvin
2005-09-30 6:21 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1128027901.24397.57.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).