Re: lots of unused variable warnings in assert-free builds
От | Robert Haas |
---|---|
Тема | Re: lots of unused variable warnings in assert-free builds |
Дата | |
Msg-id | CA+TgmobathBvzr0ZJ_c0mxNYJwe_WJhBTmVNtoFXE+icWchR+A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: lots of unused variable warnings in assert-free builds (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: lots of unused variable warnings in assert-free builds
|
Список | pgsql-hackers |
On Tue, Jan 24, 2012 at 12:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> Spraying the code with __attribute__((unused)) is somewhat undesirable >> because it could mask a failure to properly initialize the variable in >> an assert-enabled build. > > Ouch. Is it really true that __attribute__((unused)) disables detection > of use of uninitialized variables? That would be nasty, and it's not > obvious to me why it should need to work like that. But if it is true, > then I agree that that makes this approach not too tenable. Oh, I think maybe I am confused. The downsides of disabling *unused* variable detection are obviously much less than the downsides of disabling *uninitialized* variable declaration... although neither is ideal. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: