From: "phil song" <philsong@techtrex.com>
To: Manish Katiyar <mkatiyar@gmail.com>,
Randi Botse <nightdecoder@gmail.com>
Cc: linux-c-programming <linux-c-programming@vger.kernel.org>
Subject: Re: Re: function cast?
Date: Mon, 1 Feb 2010 12:33:07 +0800 [thread overview]
Message-ID: <201002011233052965296@techtrex.com> (raw)
In-Reply-To: ea11fea31001272220w6e8aa529y7c9eb39bb6294729@mail.gmail.com
HI,Manish Katiyar!
thanks,I see too now.
======= 2010-01-28 14:24:58 The letter which you writted before:=======
>On Thu, Jan 28, 2010 at 11:39 AM, Randi Botse <nightdecoder@gmail.com> wrote:
>> (sorry for my first uncomplete email, please abandon the first mail)
>>
>> Hi All,
>>
>> Sometimes i see codes are written like this:
>>
>> (void) printf(fmt);
>>
>> - or -
>>
>> (void) close(fd);
>>
>> What these means? i think it is not necessary to put that 'void' on a
>> statement, or it just like when we cast a data type like:
>>
>> double d = 93.43;
>> int i = (int) d;
>>
>> but why those function need to be casted in a 'void' ?
>
>Some time it is also to shut up static analysis tools, which might
>crib if the function is supposed to return a value and you have not
>used the return value. It might be intentional or you might have just
>missed. So inorder to show that it is intetional not to use the return
>value we typecast it.
>
>Thanks -
>Manish
>
>>
>> Thanks,
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>
>
>--
>Thanks -
>Manish
>==================================
>[$\*.^ -- I miss being one of them
>==================================
>--
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
= = = = = = = = = = = = = = = = = = = =
Sincerely
phil song
philsong@techtrex.com
2010-02-01
prev parent reply other threads:[~2010-02-01 4:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 6:05 function cast? Randi Botse
2010-01-28 6:09 ` Randi Botse
2010-01-28 6:20 ` Manish Katiyar
2010-02-01 4:33 ` phil song [this message]
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=201002011233052965296@techtrex.com \
--to=philsong@techtrex.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=mkatiyar@gmail.com \
--cc=nightdecoder@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.