CMake/Tests/RunCMake/ObjectLibrary/b.c
Brad King 4150a18910 Tests: Fix -Wstrict-prototypes warnings in some C sources
Some RunCMake tests fail with this warning due to extra stderr content:

    warning: this old-style function definition is not preceded by a prototype

Convert `foo()` to `foo(void)` in `.c` sources of affected tests.
2020-05-13 08:11:59 -04:00

15 lines
246 B
C

#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
# define EXPORT __declspec(dllexport)
#else
# define EXPORT
#endif
extern int a(void);
EXPORT int b(void)
{
return a();
}
#ifndef REQUIRED
# error "REQUIRED needs to be defined"
#endif