extras: pthread: fix check for C mode with paranoid -Werror=old-style-declaration and -Werror=unused-variable

This commit is contained in:
Alibek Omarov 2024-01-23 18:39:14 +00:00
parent a23b3f5e9b
commit 611cd30114
1 changed files with 5 additions and 1 deletions

View File

@ -9,13 +9,17 @@ PTHREAD_CHECK = '''
#include <pthread.h>
static void* fun(void* params) {
(void)params;
return NULL;
}
int main() {
int main(int argc, char **argv) {
pthread_t thread;
(void)argc;
(void)argv;
pthread_create(&thread, NULL, &fun, NULL);
pthread_join(thread, NULL);
return 0;
}
'''