diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop1.cpp b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop1.cpp index 344910dbfe1..c2a3eef87ef 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop1.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop1.cpp @@ -10,9 +10,9 @@ extern int w1, w2; #define restrict __restrict__ #endif -void *__builtin_alloca(unsigned long long sz); +void *__builtin_alloca(unsigned long sz); #define alloca __builtin_alloca -typedef unsigned long size_t; +typedef unsigned long long size_t; int printf(const char *restrict format, ...); void *memcpy(void *restrict s1, const void *restrict s2, size_t n); diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop2.c b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop2.c index da381758453..7f8ce7a07fe 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop2.c +++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop2.c @@ -1,15 +1,15 @@ // semmle-extractor-options: --clang int printf(const char *restrict format, ...); -int sprintf(char *restrict buf, const char *restrict format, ...); -typedef unsigned long size_t; +int sprintf(char *restrict s, const char *restrict format, ...); +typedef unsigned long long size_t; void *memcpy(void *restrict s1, const void *restrict s2, size_t n); -void *malloc(size_t sz); +void *malloc(size_t size); void free(void *ptr); struct vtype { int i1, i2; }; extern int w1, w2; -void *_builtin_alloca(unsigned long long sz); +void *_builtin_alloca(unsigned long sz); #define alloca __builtin_alloca // We forward-declare the Microsoft routines diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop3.cpp b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop3.cpp index 9cdcf884956..b3418829e48 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop3.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/AllocaInLoop/AllocaInLoop3.cpp @@ -6,10 +6,10 @@ #define restrict __restrict__ #endif -int sprintf(char *restrict buf, const char *restrict format, ...); -char * strdup(const char *restrict str1); +int sprintf(char *restrict s, const char *restrict format, ...); +char * strdup(const char *restrict s); -void *__builtin_alloca(unsigned long long sz); +void *__builtin_alloca(unsigned long sz); #define alloca __builtin_alloca // case 1: a GNU c/c++ lambda with an alloca in it