Skip to content
  • Philippe Mathieu-Daudé's avatar
    9a571161
    hw/pci-host/piix: Include "qemu/range.h" · 9a571161
    Philippe Mathieu-Daudé authored
    
    
    hw/pci-host/piix.c calls various functions from the Range API.
    Include "qemu/range.h" which declares them.
    
    This fixes (when modifying unrelated headers):
    
      hw/pci-host/i440fx.c:54:11: error: field has incomplete type 'Range' (aka 'struct Range')
          Range pci_hole;
               ^
      include/qemu/typedefs.h:116:16: note: forward declaration of 'struct Range'
      typedef struct Range Range;
                     ^
      hw/pci-host/i440fx.c:126:9: error: implicit declaration of function 'ranges_overlap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          if (ranges_overlap(address, len, I440FX_PAM, I440FX_PAM_SIZE) ||
              ^
      hw/pci-host/i440fx.c:126:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      hw/pci-host/i440fx.c:127:9: error: implicit declaration of function 'range_covers_byte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
              range_covers_byte(address, len, I440FX_SMRAM)) {
              ^
      hw/pci-host/i440fx.c:127:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      hw/pci-host/i440fx.c:189:13: error: implicit declaration of function 'range_is_empty' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          val64 = range_is_empty(&s->pci_hole) ? 0 : range_lob(&s->pci_hole);
                  ^
    
    Acked-by: default avatarJohn Snow <jsnow@redhat.com>
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-Id: <20200228114649.12818-15-philmd@redhat.com>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
    9a571161
    hw/pci-host/piix: Include "qemu/range.h"
    Philippe Mathieu-Daudé authored
    
    
    hw/pci-host/piix.c calls various functions from the Range API.
    Include "qemu/range.h" which declares them.
    
    This fixes (when modifying unrelated headers):
    
      hw/pci-host/i440fx.c:54:11: error: field has incomplete type 'Range' (aka 'struct Range')
          Range pci_hole;
               ^
      include/qemu/typedefs.h:116:16: note: forward declaration of 'struct Range'
      typedef struct Range Range;
                     ^
      hw/pci-host/i440fx.c:126:9: error: implicit declaration of function 'ranges_overlap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          if (ranges_overlap(address, len, I440FX_PAM, I440FX_PAM_SIZE) ||
              ^
      hw/pci-host/i440fx.c:126:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      hw/pci-host/i440fx.c:127:9: error: implicit declaration of function 'range_covers_byte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
              range_covers_byte(address, len, I440FX_SMRAM)) {
              ^
      hw/pci-host/i440fx.c:127:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      hw/pci-host/i440fx.c:189:13: error: implicit declaration of function 'range_is_empty' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          val64 = range_is_empty(&s->pci_hole) ? 0 : range_lob(&s->pci_hole);
                  ^
    
    Acked-by: default avatarJohn Snow <jsnow@redhat.com>
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-Id: <20200228114649.12818-15-philmd@redhat.com>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
Loading