From: Karsten Keil <kkeil@linux-pingi.de>
To: Danny Kukawka <danny.kukawka@bisect.de>
Cc: David Laight <David.Laight@aculab.com>,
Karsten Keil <kkeil@linux-pingi.de>,
Ben Hutchings <bhutchings@solarflare.com>,
Armin Schindler <mac@melware.de>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Karsten Keil <isdn@linux-pingi.de>
Subject: Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
Date: Thu, 2 Feb 2012 19:25:15 +0100 [thread overview]
Message-ID: <20120202182515.GA11660@gw.linux-pingi.de> (raw)
In-Reply-To: <201202011352.19539.danny.kukawka@bisect.de>
On Wed, Feb 01, 2012 at 01:52:18PM +0100, Danny Kukawka wrote:
> On Mittwoch, 1. Februar 2012, David Laight wrote:
> > > -----Original Message-----
> > > From: netdev-owner@vger.kernel.org
> > > [mailto:netdev-owner@vger.kernel.org] On Behalf Of Danny Kukawka
> > > Sent: 31 January 2012 17:04
> > > To: Karsten Keil
> > > Cc: Ben Hutchings; Armin Schindler;
> > > linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Karsten Keil
> > > Subject: Re: [PATCH 01/16] eicon: fix -Warray-bounds warning
> > >
> > > On Dienstag, 31. Januar 2012, Karsten Keil wrote:
> > > > On Mon, Jan 30, 2012 at 11:09:32PM +0000, Ben Hutchings wrote:
> > > > > On Mon, 2012-01-30 at 23:00 +0100, Danny Kukawka wrote:
> > > > > > Fix for a -Warray-bounds warning. mixer_notify_update() tries to
> > > > > > write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
> > > > > > structs is defined as byte structs[1], define structs[1] as
> > > > > > structs[4].
> > > > >
> > > > > I suspect that all the 'byte structs[1];' fields defined
> > >
> > > in that header
> > >
> > > > > are actually variable-length arrays. In that case, there
> > >
> > > may be no
> > >
> > > > > reasonable bound you can specify.
> > > >
> > > > Yes, exactely, the structs is a ASN1 coded message so it
> > >
> > > can have any len.
> > >
> > > So, how can we get rid of the compiler warning then?
> >
> > Try defining it as a 'variable sized array' - byte structs[0].
>
> Okay, that works. I'll send an updated patch.
>
Nice, I did not know this way.
Karsten
next prev parent reply other threads:[~2012-02-02 18:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
2012-01-30 23:09 ` Ben Hutchings
2012-01-31 15:25 ` Karsten Keil
2012-01-31 17:04 ` Danny Kukawka
2012-02-01 9:04 ` David Laight
2012-02-01 12:52 ` Danny Kukawka
2012-02-02 18:25 ` Karsten Keil [this message]
2012-01-30 22:00 ` [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 03/16] mmc: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 13:45 ` Danny Kukawka
2012-01-31 14:59 ` Andy Walls
2012-02-01 2:29 ` Rusty Russell
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
2012-02-03 0:06 ` Scott Murray
2012-02-10 19:40 ` Jesse Barnes
2012-01-30 22:00 ` [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized Danny Kukawka
2012-01-30 22:00 ` [PATCH 09/16] [RFC] aic94xx: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 10/16] ixj: fix Wsequence-point compiler warnings Danny Kukawka
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
2012-01-30 22:00 ` Danny Kukawka
2012-01-30 22:11 ` Jiri Slaby
2012-01-30 22:11 ` Jiri Slaby
2012-01-30 23:09 ` Danny Kukawka
2012-01-30 23:09 ` Danny Kukawka
2012-01-30 23:09 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
2012-01-30 23:13 ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
2012-01-30 22:00 ` Danny Kukawka
2012-02-13 21:26 ` Florian Tobias Schandinat
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
2012-02-01 19:40 ` David Miller
2012-01-30 22:00 ` [PATCH v2 15/16] leds-lp5521: fix compiler warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 16/16] leds-lp5523: " Danny Kukawka
[not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
2012-01-31 13:45 ` [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 15:00 ` Andy Walls
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=20120202182515.GA11660@gw.linux-pingi.de \
--to=kkeil@linux-pingi.de \
--cc=David.Laight@aculab.com \
--cc=bhutchings@solarflare.com \
--cc=danny.kukawka@bisect.de \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mac@melware.de \
--cc=netdev@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 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.