Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-07 Thread Emil Velikov
Hi Chih-Wei, On 6 June 2017 at 06:16, Chih-Wei Huang wrote: > Making the code warning-free is the responsibility > of the one who wrote the code instead of > the one who builds the code. > if you look closer you'll see that particular warning will be triggered at almost

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-06 Thread Marek Olšák
On Tue, Jun 6, 2017 at 7:16 AM, Chih-Wei Huang wrote: > 2017-06-05 3:57 GMT+08:00 Marek Olšák : >> NAK. >> >> In C/C++, the initializer is used to clear the memory to 0s, thus, >> adding 0s to the initializer is redundant and unnecessary. Empty >>

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-05 Thread Chih-Wei Huang
2017-06-05 3:57 GMT+08:00 Marek Olšák : > NAK. > > In C/C++, the initializer is used to clear the memory to 0s, thus, > adding 0s to the initializer is redundant and unnecessary. Empty > initializer {} is also commonly used instead of memset. Commonly used doesn't mean it's the

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-04 Thread Emil Velikov
On 4 June 2017 at 21:27, Benedikt Schemmer wrote: > Hi all, > > my reasoning wasn't based on how c handles partial initializations, > but on how the generated files look like: like something is missing. > > Also I don't want to suppress these warnings, because I don't have > the

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-04 Thread Benedikt Schemmer
Hi all, my reasoning wasn't based on how c handles partial initializations, but on how the generated files look like: like something is missing. Also I don't want to suppress these warnings, because I don't have the experience you have with the codebase and would kind of like to see if my

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-04 Thread Bas Nieuwenhuizen
Hi Marek, Do you have any other reasons besides it not improving correctness? I'd like to pick at least the radv one, as the code doesn't get less clear, and using 5 zeros for struct with 6 members is just plain silly. - Bas On Sun, Jun 4, 2017 at 9:57 PM, Marek Olšák wrote:

Re: [Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-04 Thread Marek Olšák
NAK. In C/C++, the initializer is used to clear the memory to 0s, thus, adding 0s to the initializer is redundant and unnecessary. Empty initializer {} is also commonly used instead of memset. You need to suppress this warning if you don't want to see it. Marek On Sun, Jun 4, 2017 at 9:45 AM,

[Mesa-dev] [PATCH 0/3] Fix missing initializer errors in generated tables

2017-06-04 Thread Benedikt Schemmer
I send these patches as a series because they share the same problem: all have missing fields in the default initialization path for field/register definitions. This causes several hundreds (thousands?) of "missing initializer" warnings from the compiler making it hard to spot less frequent