On 22 Feb 2016, at 10:56, David Chisnall wrote:
>
> On 19 Feb 2016, at 23:23, Dimitry Andric wrote:
>>
>> This warning is only produced when you use -Wall -W, and then initialize
>> structs partially, i.e. you initialize some fields but not others. I
>>
On Fri, Feb 19, 2016 at 04:50:40PM -0800, Conrad Meyer wrote:
C> > It is not quite as simple as this would make it sound. The elements or
C> > members of an aggregate (e.g.) structure type are initialized as if it were
C> > an object of static storage duration (i.e., to zero) if the initializer
On 22 Feb 2016, at 10:15, Kubilay Kocak wrote:
>
> For the lay persons among us (I'm genuinely interested), what are the
> the downsides to requiring initialization of all fields?
Explicit initialisation, or initialisation in general?
Being able to initialise the entire
On 22/02/2016 8:56 PM, David Chisnall wrote:
> On 19 Feb 2016, at 23:23, Dimitry Andric wrote:
>>
>> This warning is only produced when you use -Wall -W, and then
>> initialize structs partially, i.e. you initialize some fields but
>> not others. I think this is a quite
On 19 Feb 2016, at 23:23, Dimitry Andric wrote:
>
> This warning is only produced when you use -Wall -W, and then initialize
> structs partially, i.e. you initialize some fields but not others. I
> think this is a quite reasonable warning for a high warning level.
The warning
On Sun, Feb 21, 2016 at 3:00 PM, Andrew Turner wrote:
> On Thu, 18 Feb 2016 20:08:01 + (UTC)
> Alan Somers wrote:
>
>> Author: asomers
>> Date: Thu Feb 18 20:08:01 2016
>> New Revision: 295768
>> URL: https://svnweb.freebsd.org/changeset/base/295768
On Thu, 18 Feb 2016 20:08:01 + (UTC)
Alan Somers wrote:
> Author: asomers
> Date: Thu Feb 18 20:08:01 2016
> New Revision: 295768
> URL: https://svnweb.freebsd.org/changeset/base/295768
>
> Log:
> Fix compiler warnings in iostat
>
> Raise WARNS from 1 to 6 (the
On Sat, 20 Feb 2016, Dimitry Andric wrote:
On 19 Feb 2016, at 16:49, Alan Somers wrote:
On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote:
...
-struct nlist namelist[] = {
+static struct nlist namelist[] = {
#define X_TTY_NIN 0
- {
On Fri, 19 Feb 2016, Benjamin Kaduk wrote:
On Fri, Feb 19, 2016 at 5:06 PM, Gleb Smirnoff wrote:
On Fri, Feb 19, 2016 at 08:49:43AM -0700, Alan Somers wrote:
A> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov
wrote:
A> Yeah, it was being implicitly
On Fri, Feb 19, 2016 at 3:14 PM, Benjamin Kaduk wrote:
> On Fri, Feb 19, 2016 at 5:06 PM, Gleb Smirnoff wrote:
>> Isn't zero filling part of the standard? I don't see why lack of
>> explicit zeroing is a warning? Looks a false warning to me.
>
>
> It is
On Fri, Feb 19, 2016 at 3:06 PM, Gleb Smirnoff wrote:
> Isn't zero filling part of the standard? I don't see why lack of
> explicit zeroing is a warning? Looks a false warning to me.
Yep. This is Clang being too whiney, IMO. I think a good workaround
is to add
On Sat, Feb 20, 2016 at 12:23:40AM +0100, Dimitry Andric wrote:
D> You got this warning, most likely:
D>
D> usr.sbin/iostat/iostat.c:122:15: error: missing field 'n_type' initializer
[-Werror,-Wmissing-field-initializers]
D> { "_tty_nin" },
D> ^
D>
D> This warning
On 19 Feb 2016, at 16:49, Alan Somers wrote:
>
> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote:
...
>>> -struct nlist namelist[] = {
>>> +static struct nlist namelist[] = {
>>> #define X_TTY_NIN 0
>>> - { "_tty_nin" },
>>> + {
On Fri, Feb 19, 2016 at 5:06 PM, Gleb Smirnoff wrote:
> On Fri, Feb 19, 2016 at 08:49:43AM -0700, Alan Somers wrote:
> A> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov
> wrote:
> A> Yeah, it was being implicitly zeroized before. But Clang complained
On Fri, Feb 19, 2016 at 08:49:43AM -0700, Alan Somers wrote:
A> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote:
A> > On 18 February 2016 at 23:08, Alan Somers wrote:
A> >> Author: asomers
A> >> Date: Thu Feb 18 20:08:01 2016
A> >> New Revision:
On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov wrote:
> On 18 February 2016 at 23:08, Alan Somers wrote:
>> Author: asomers
>> Date: Thu Feb 18 20:08:01 2016
>> New Revision: 295768
>> URL: https://svnweb.freebsd.org/changeset/base/295768
>>
>> Log:
>>
On 18 February 2016 at 23:08, Alan Somers wrote:
> Author: asomers
> Date: Thu Feb 18 20:08:01 2016
> New Revision: 295768
> URL: https://svnweb.freebsd.org/changeset/base/295768
>
> Log:
> Fix compiler warnings in iostat
> Modified: head/usr.sbin/iostat/iostat.c
>
Author: asomers
Date: Thu Feb 18 20:08:01 2016
New Revision: 295768
URL: https://svnweb.freebsd.org/changeset/base/295768
Log:
Fix compiler warnings in iostat
Raise WARNS from 1 to 6 (the default)
Fix warnings:
* Use C99 designated initializers for structs, and initialize all fields
18 matches
Mail list logo