From: Andrew Lunn <andrew@lunn•ch>
To: Vladimir Oltean <olteanv@gmail•com>
Cc: f.fainelli@gmail•com, vivien.didelot@gmail•com,
davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [PATCH net-next 1/2] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c
Date: Sun, 31 May 2020 02:38:21 +0200 [thread overview]
Message-ID: <20200531003821.GA897737@lunn.ch> (raw)
In-Reply-To: <20200530102953.692780-2-olteanv@gmail.com>
On Sat, May 30, 2020 at 01:29:52PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp•com>
>
> Newer compilers complain with W=1 builds that there are non-static
> functions defined in sja1105_static_config.c that don't have a
> prototype, because their prototype is defined in sja1105.h which this
> translation unit does not include.
>
> I don't entirely understand what is the point of these warnings, since
> in principle there's nothing wrong with that.
Hi Vladimir
The issue here is that the header might have a typo and have a
different signature than the function itself. The caller than passes
the parameters in the wrong way. Best case it segfault/Opps, but it
can introduce subtle bugs which are hard to find.
Andrew
next prev parent reply other threads:[~2020-05-31 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 10:29 [PATCH net-next 0/2] Fix 2 non-critical issues in SJA1105 DSA Vladimir Oltean
2020-05-30 10:29 ` [PATCH net-next 1/2] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c Vladimir Oltean
2020-05-30 18:40 ` Florian Fainelli
2020-05-31 0:38 ` Andrew Lunn [this message]
2020-05-30 10:29 ` [PATCH net-next 2/2] net: dsa: sja1105: fix port mirroring for P/Q/R/S Vladimir Oltean
2020-05-31 1:01 ` [PATCH net-next 0/2] Fix 2 non-critical issues in SJA1105 DSA David Miller
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=20200531003821.GA897737@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=f.fainelli@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olteanv@gmail$(echo .)com \
--cc=vivien.didelot@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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