Markus Armbruster <[email protected]> wrote:
> Stefan Hajnoczi <[email protected]> writes:
>
>> Juan reported that RHEL 6.4 hosts give compiler warnings because we use
>> unsigned int while glib prototypes use volatile gint in trace/simple.c.
>>
>>   trace/simple.c:223: error: pointer targets in passing argument 1
>> of 'g_atomic_int_compare_and_exchange' differ in signedness
>
> Meh.  Contrary to documentation and how current GLib versions behave, in
> other words a bug in need of a workaround.
>
>> These variables are only accessed with glib atomic int functions so
>> let's play it by the book and use volatile gint.
>
> gint is a silly alias for int, and used completely interchangeably, even
> within GLib APIs.  Any pretentions of treating it as something more
> abstract break down at the first printf(), if not earlier.  But if you
> think it helps...

>> -static unsigned int trace_idx;
>> +static volatile gint trace_idx;

Problem was this bit.  int vs unsigned.

Later, Juan.

Reply via email to