public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: ram <gangadhar@applabs.net>
Cc: gcc-help@gcc.gnu.org
Subject: Re: help needed
Date: Sat, 13 Oct 2001 01:41:00 -0000	[thread overview]
Message-ID: <87sncnzzcd.fsf@deneb.enyo.de> (raw)
In-Reply-To: <2166516A9A4ED511AE100050BA88392E08A1@MAIL>

ram <gangadhar@applabs.net> writes:

> itfrecv.c: In function `ack_funct':
> itfrecv.c:389: too few arguments to function `send'
> itfrecv.c: In function `errlog':
> itfrecv.c:422: warning: passing arg 3 of `write' makes integer from pointer
> without a cast     
>
> the lines are as below
>
>  389         send(sockfd, buffer, strlen(buffer));
> 422         write(fd, buffer, index);  
>
> what should I change to make the program compile with gcc.

The send(2) function on GNU/Linux takes four parameters, not three
(see the manual).  However, it is possible that your program defines
its own send() function, in this case you would have to rename it.

The warning seems to indicate a genuine bug in the code:  It doesn't
make much sense to pass a pointer value as a byte count to write(2).

(These problems are not related to GCC, you should probably ask in a
more appropriate forum such as comp.os.linux.development.apps.)

  reply	other threads:[~2001-10-13  1:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-13  0:36 ram
2001-10-13  1:41 ` Florian Weimer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-27 10:17 anandulle
2009-07-27 18:10 ` Andi Hellmund
2006-03-07  2:03 Help needed wenghwee
2005-08-25 23:40 RALPH OLD JR
2005-08-26  5:20 ` Arturas Moskvinas
     [not found] <20040830122911.24797.qmail@webmail17.rediffmail.com>
2004-08-30 16:09 ` Help Needed Eljay Love-Jensen
2004-06-08 16:22 help needed lrtaylor
2004-06-09  9:25 ` Claudio Bley
2004-06-06  2:55 Naga Raju Thogiti
2004-06-08 10:17 ` Claudio Bley
2004-06-08 14:22   ` Claudio Bley
2004-05-29  0:41 xuyi
2004-05-29 19:03 ` Sumith Makam
2004-04-28  5:19 Help Needed Prashant S Kulkarni
2004-04-28 17:51 ` David Edelsohn
2003-11-20 12:46 help needed Jomy Abraham
2003-03-17  7:51 Help Needed Dockeen
2003-03-16 21:32 R.Karthik Narayanan
2003-03-17  3:02 ` LLeweLLyn Reese
2003-03-18  0:25   ` Karthik Narayanan
     [not found]   ` <1048367240.1224.51.camel@x1-6-00-e0-18-67-55-94>
2003-03-18  1:51     ` LLeweLLyn Reese
2000-09-26  6:30 help needed Kazu Hirata
2000-09-26  4:44 BRAHMAIAH VALLABHANENI
2000-09-26 21:49 ` Kiran Kumar K
2000-09-13  3:54 brahmaiah vallabhaneni
2000-04-09 21:24 Help needed Mahadev Cholachgudda
2000-04-07 23:07 Mahadev Cholachgudda

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=87sncnzzcd.fsf@deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=gangadhar@applabs.net \
    --cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).