Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-27 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/27/2015 03:17, Michael Thayer wrote: > On 26.03.2015 20:48, Jung-uk Kim wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 >> >> On 03/26/2015 15:25, Michal Necasek wrote: >>> Sorry, I wasn't clear. By "what is the semantic difference"

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-27 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/27/2015 05:54, Michal Necasek wrote: > After a bit of internal discussion, we suspect that the flagged > instance does not in fact involve a pointer. > > Could you please run the module through a preprocessor in your > compilation environmen

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-27 Thread Michal Necasek
;> - Original Message - From: j...@freebsd.org To: >> michal.neca...@oracle.com, vbox-dev@virtualbox.org Sent: Thursday, >> March 26, 2015 7:59:29 PM GMT +01:00 Amsterdam / Berlin / Bern / >> Rome / Stockholm / Vienna Subject: Re: [vbox-dev] [PATCH 2/8] Fix >> an i

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-27 Thread Michal Necasek
rogrammers can have a hard time reading compilers' >> minds, too. > > Last time I checked compilers lacked mind. ;-) > > Jung-uk Kim > >> - Original Message - From: j...@freebsd.org To: >> michal.neca...@oracle.com, vbox-dev@virtualbox.org Sent: Thursda

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-27 Thread Michael Thayer
On 26.03.2015 20:48, Jung-uk Kim wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 03/26/2015 15:25, Michal Necasek wrote: >> Sorry, I wasn't clear. By "what is the semantic difference" I meant >> "under what circumstances will the conditional behave differently". >> There must be s

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Jung-uk Kim
s lacked mind. ;-) Jung-uk Kim > - Original Message - From: j...@freebsd.org To: > michal.neca...@oracle.com, vbox-dev@virtualbox.org Sent: Thursday, > March 26, 2015 7:59:29 PM GMT +01:00 Amsterdam / Berlin / Bern / > Rome / Stockholm / Vienna Subject: Re: [vbox-dev] [PATCH

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Michal Necasek
rd time reading compilers' minds, too. - Original Message - From: j...@freebsd.org To: michal.neca...@oracle.com, vbox-dev@virtualbox.org Sent: Thursday, March 26, 2015 7:59:29 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [vbox-dev] [PATCH 2/8] Fix an im

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/26/2015 14:03, Michal Necasek wrote: > > The question isn't whether a compiler can warn. The question is, > why should it? Although this specific code has absolutely no problem, compilers are not smart enough to read authors' mind yet. ;-) >

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Michal Necasek
8 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/26/2015 04:51, Frank Mehnert wrote: > Hi, > > On Friday 13 March 2015 16:56:56

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/26/2015 04:51, Frank Mehnert wrote: > Hi, > > On Friday 13 March 2015 16:56:56 Jung-uk Kim wrote: >> This fix an implicit conversion from pointer to bool. > > why is this patch necessary? An expression like > > if (pointer) { } > > is compl

Re: [vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-26 Thread Frank Mehnert
Hi, On Friday 13 March 2015 16:56:56 Jung-uk Kim wrote: > This fix an implicit conversion from pointer to bool. why is this patch necessary? An expression like if (pointer) { } is completely valid and no compiler should warn about it. It tests if the pointer has a value different from NUL

[vbox-dev] [PATCH 2/8] Fix an implicit conversion from pointer to bool

2015-03-13 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 This fix an implicit conversion from pointer to bool. Jung-uk Kim -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBCAAGBQJVA08YAAoJEHyflib82/FGVQwIAJbs+3+UO1hq1jwfPupI/w1Q KS21i1Lj9OsvmY3pQLfaTAIJfPX7aLyghhMri+zhti9L4E7Mh+Eedwdil5/HLLPT 1XF8