C++: cast result of malloc
[c11tester.git] / libthreads.c
index 8dd05d13da60af38a26124e7c93f0ab85d58503d..dbaf9e96435a7c04bb3e5301974ef0f315f36cdc 100644 (file)
@@ -156,7 +156,7 @@ int main()
 
        model_checker_init();
 
-       main_thread = malloc(sizeof(struct thread));
+       main_thread = (struct thread *)malloc(sizeof(*main_thread));
        create_initial_thread(main_thread);
        model_checker_add_system_thread(main_thread);