[ltt-dev] Please use underscore variable names in macros (to avoid conflicts)

Mathieu Desnoyers compudj at krystal.dyndns.org
Mon Mar 28 18:14:40 EDT 2011


* Paul Wögerer (paul_woegerer at mentor.com) wrote:
> Hi,
>
> The following trivial piece of code will result in corrupt events:
>
> void dump_ackerman_current( int m, int n )
> {
>     trace_mark( ackerman, current, "m %d n %d", m, n );
> }
>
> This is because in ust/marker.h line 173 the definition of the  
> __trace_mark_counter macro uses a temporary named m (which shadows the  
> original m). It might be a good idea to use underscore variable names  
> inside these macros to make naming conflicts less likely.

Fix pushed into the git HEAD. Thanks for the report.

Mathieu

>
> Thanks,
> Paul
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list