[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: Use 'idx' instead of 'index' for variable name



On Tue, Apr 14, 2015 at 06:45:48AM -0400, John Ferlan wrote:
> Apparently for Xen-devel 'index' is a global and causes a build failure,
> so just use the shortened 'idx' instead to avoid the conflict.
> 
> Signed-off-by: John Ferlan <jferlan redhat com>
> ---
> 
> I did try modify cfg.mk to add a syntax check similar to the ii,jj,kk
> checks, but it tripped up over 'index' declarations inside structures.
> I'd be happy to add one, but I need some help formatting it... Here's
> what I had:
> 
> sc_prohibit_int_index:
>         @prohibit='\<(int|unsigned) ([^(=]* )*(index)\>(\s|,|;)'    \
>         halt='use different name than 'index' for declaration'      \
>         $(_sc_search_regexp)

We could just rename the fields in the structs too - wouldn't be the
end of the world to use idx in those too just to simplify our life.

ACK to your immediate fix now anyway.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]