Skip to content
  • Daniel Martin's avatar
    xfree86: Fix set but not used warnings in lnx_platform · 02981fe1
    Daniel Martin authored and Adam Jackson's avatar Adam Jackson committed
    
    
    Those warnings are generated, when building without systemd support:
    
    ../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’:
    ../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable]
         int major, minor, fd;
                    ^~~~~
    ../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable]
         int major, minor, fd;
             ^~~~~
    
    In this case the functions are macros, which don't use theese arguments.
    
    v2: Add comments, why the warnings appear. Suggested by Emil Velikov
    
    Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Signed-off-by: default avatarDaniel Martin <consume.noise@gmail.com>
    02981fe1