On 04/28/2017 10:10 AM, Daniel P. Berrange wrote:
>>> Or could we perhaps instead undo the damage via a hack like
>>>
>>> #define g_assert_cmpint g_assert_cmpint_orig
>>> #define g_assert_cmpint(x, y, z) \
>>> g_assert_cmpint_orig(x, y,x); \
>>> abort()
Not quite the right hack (we do
On Fri, Apr 28, 2017 at 02:45:32PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrange (berra...@redhat.com) wrote:
> > On Thu, Apr 27, 2017 at 05:55:26PM +0100, Dr. David Alan Gilbert (git)
> > wrote:
> > > From: "Dr. David Alan Gilbert"
> > >
> > > Glib commit a6a875068779 (from 2013)
On 04/28/2017 08:34 AM, Markus Armbruster wrote:
>>
>> Ban most of the glib assertion functions (basically everything except
>> g_assert and g_assert_not_reached) except in tests/
You'll also want to exclude scripts/ and possible include/glib-compat.h...
> If these are screwy enough to warrant
On 28 April 2017 at 14:34, Markus Armbruster wrote:
> If these are screwy enough to warrant rejecting them in new code,
> they're probably screwy enough to purge them from existing code:
>
> include/glib-compat.h:#ifndef g_assert_true
> include/glib-compat.h:#define g_assert_true(expr)
T
* Daniel P. Berrange (berra...@redhat.com) wrote:
> On Thu, Apr 27, 2017 at 05:55:26PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert"
> >
> > Glib commit a6a875068779 (from 2013) made many of the glib assert
> > macros non-fatal if a flag is set.
> > This causes two
On Thu, Apr 27, 2017 at 05:55:26PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert"
>
> Glib commit a6a875068779 (from 2013) made many of the glib assert
> macros non-fatal if a flag is set.
> This causes two problems:
> a) Compilers moan that your code is unsafe even
"Dr. David Alan Gilbert (git)" writes:
> From: "Dr. David Alan Gilbert"
>
> Glib commit a6a875068779 (from 2013) made many of the glib assert
> macros non-fatal if a flag is set.
> This causes two problems:
> a) Compilers moan that your code is unsafe even though you've
> put an assert in
- Original Message -
> From: "Dr. David Alan Gilbert (git)"
> To: qemu-devel@nongnu.org, pbonz...@redhat.com, arm...@redhat.com
> Sent: Thursday, April 27, 2017 6:55:26 PM
> Subject: [Qemu-devel] [PATCH] checkpatch: Disallow glib asserts in main code
>
> F
From: "Dr. David Alan Gilbert"
Glib commit a6a875068779 (from 2013) made many of the glib assert
macros non-fatal if a flag is set.
This causes two problems:
a) Compilers moan that your code is unsafe even though you've
put an assert in before the point of use.
b) Someone evil could, in