Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
30
thirdparty/hedley/test/array-param.c
vendored
Normal file
30
thirdparty/hedley/test/array-param.c
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "../hedley.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
HEDLEY_DIAGNOSTIC_PUSH
|
||||
#pragma warning(disable:4668)
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
HEDLEY_DIAGNOSTIC_POP
|
||||
#else
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
static void
|
||||
clear_buffer (size_t* buffer_size, unsigned char buffer[HEDLEY_ARRAY_PARAM(*buffer_size)]) {
|
||||
size_t p;
|
||||
for (p = 0 ; p < *buffer_size ; p++)
|
||||
buffer[p] = 0;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[HEDLEY_ARRAY_PARAM(argc)]) {
|
||||
unsigned char foo[8192];
|
||||
size_t foo_l = sizeof(foo);
|
||||
|
||||
assert(argv[argc - 1] != NULL);
|
||||
|
||||
clear_buffer(&foo_l, foo);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue