Skip to content
  • Leonid Bloch's avatar
    f2dfe54c
    configure: Do not ignore malloc value · f2dfe54c
    Leonid Bloch authored
    
    
    Not checking the value of malloc will cause a warning with GCC 10.1,
    which may result in configuration failure, with the following line in
    config.log:
    
    config-temp/qemu-conf.c:2:18: error: ignoring return value of ‘malloc’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
        2 | int main(void) { malloc(1); return 0; }
          |                  ^~~~~~~~~
    
    Signed-off-by: default avatarLeonid Bloch <lb.workbox@gmail.com>
    Message-Id: <20200524221204.9791-1-lb.workbox@gmail.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    f2dfe54c
    configure: Do not ignore malloc value
    Leonid Bloch authored
    
    
    Not checking the value of malloc will cause a warning with GCC 10.1,
    which may result in configuration failure, with the following line in
    config.log:
    
    config-temp/qemu-conf.c:2:18: error: ignoring return value of ‘malloc’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
        2 | int main(void) { malloc(1); return 0; }
          |                  ^~~~~~~~~
    
    Signed-off-by: default avatarLeonid Bloch <lb.workbox@gmail.com>
    Message-Id: <20200524221204.9791-1-lb.workbox@gmail.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading