libdpf/thirdparty/hedley/test/returns-non-null.c
Ryan Henry e4e666f459 Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 14:08:32 -06:00

15 lines
255 B
C

#include "../hedley.h"
#include <string.h>
static const char* foo = "bar\n";
HEDLEY_RETURNS_NON_NULL
static const char* get_string(void) {
return foo;
}
int main(void) {
const char* s = get_string();
return HEDLEY_STATIC_CAST(int, strlen(s));
}