Skip to content
Snippets Groups Projects
  1. Nov 13, 2019
  2. Nov 06, 2019
  3. Nov 05, 2019
  4. Nov 04, 2019
  5. Oct 31, 2019
  6. Oct 30, 2019
  7. Oct 29, 2019
  8. Oct 28, 2019
  9. Oct 25, 2019
    • Jon Turney's avatar
      rbug: Fix use of alloca() without #include "c99_alloca.h" · 87db4b93
      Jon Turney authored
      
      [12/60] Compiling C object 'src/gallium/auxiliary/eb820e8@@gallium@sta/rbug_rbug_texture.c.o'.
      FAILED: src/gallium/auxiliary/eb820e8@@gallium@sta/rbug_rbug_texture.c.o
      [...]
      ../src/gallium/auxiliary/rbug/rbug_texture.c: In function 'rbug_send_texture_info_reply':
      ../src/gallium/auxiliary/rbug/rbug_texture.c:302:21: error: implicit declaration of function 'alloca'; did you mean 'malloc'? [-Werror=implicit-function-declaration]
        uint32_t *height = alloca(sizeof(uint32_t) * height_len);
                           ^~~~~~
                           malloc
      ../src/gallium/auxiliary/rbug/rbug_texture.c:302:21: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
      ../src/gallium/auxiliary/rbug/rbug_texture.c:303:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
        uint32_t *depth = alloca(sizeof(uint32_t) * height_len);
                          ^~~~~~
      cc1: some warnings being treated as errors
      
      Include c99_alloca.h to portably make the alloca() prototype available.
      
      See also: 498d9d0f, adfb9c5c, fc8139b1
      
      Fixes: 6174cba7 ("rbug: fix transmitted texture sizes")
      Reviewed-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
      Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      (cherry picked from commit 2649609a)
      87db4b93
Loading