All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 4/4] lib: add tst_res_r.c
Date: Thu, 13 Feb 2014 18:06:09 -0500	[thread overview]
Message-ID: <2020103.1jVMlSvdbW@vapier> (raw)
In-Reply-To: <52FC98EC.80406@oracle.com>


[-- Attachment #1.1: Type: text/plain, Size: 1087 bytes --]

On Thursday, February 13, 2014 14:05:32 Alexey Kodanev wrote:
> On 02/13/2014 12:47 PM, Mike Frysinger wrote:
> > On Tuesday, February 11, 2014 13:48:10 Alexey Kodanev wrote:
> >> +static int get_tst_count()
> > 
> > random note: never never never use () with functions.  always always
> > always
> > use (void).  i'm guessing you're not aware, but what you've written here
> > may> 
> > be called (warning free!) like so:
> > 	get_tst_count(1, 2, 3);
> > 
> > yes, even with -W -Wall -Wextra.  please stamp this horrible habit out of
> > your code.
> 
> Thank you for explanation!
> There is a trick to try g++ to compile the code, it will throw an error
> on that and stops compilation.

yeah, C++ fixed this historical wart of C.  sorry for not clarifying.

iiuc (and i could be wrong as i'm not old enough to have lived through it), 
this dates back to when C (ANSI?) didn't have prototypes.  with a lot of code 
out there relying on the behavior, gcc never stopped accepting it.

i wonder if we could argue for like a newer GNU standard to reject it.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 382 bytes --]

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-02-13 23:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  9:48 [LTP] [PATCH v2 2/4] lib/test.h: create macro to declare init/cleanup functions Alexey Kodanev
2014-02-11  9:48 ` [LTP] [PATCH v2 3/4] lib: compile *_r.c to libltp_r library, add testcases_r.mk Alexey Kodanev
2014-02-11  9:48 ` [LTP] [PATCH 4/4] lib: add tst_res_r.c Alexey Kodanev
2014-02-12 15:44   ` chrubis
     [not found]     ` <5128140.KmexAZrTeg@vapier>
2014-02-13 10:21       ` chrubis
     [not found]         ` <52FCA8DF.4030503@oracle.com>
2014-02-13 13:04           ` chrubis
2014-02-13  8:47   ` Mike Frysinger
2014-02-13 10:05     ` Alexey Kodanev
2014-02-13 23:06       ` Mike Frysinger [this message]
2014-02-14 13:59         ` Alexey Kodanev
2014-02-14 17:16           ` Mike Frysinger
2014-02-19 15:19         ` chrubis
2014-02-13 10:11     ` chrubis
2014-02-12 15:37 ` [LTP] [PATCH v2 2/4] lib/test.h: create macro to declare init/cleanup functions chrubis

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=2020103.1jVMlSvdbW@vapier \
    --to=vapier@gentoo.org \
    --cc=alexey.kodanev@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vasily.isaenko@oracle.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.