165165 val add_link_flags : string list -> unit
166166end =
167167struct
168- let c_flags = ref []
168+ let c_flags = ref [" -Wall " ; " -fdiagnostics-color=always " ]
169169 let link_flags = ref []
170170
171171 let extend c_flags' link_flags' =
@@ -424,7 +424,7 @@ struct
424424 let code = {|
425425 #include < ev.h>
426426
427- int main()
427+ int main(void )
428428 {
429429 ev_default_loop(0 );
430430 return 0 ;
@@ -452,7 +452,7 @@ struct
452452 let code = {|
453453 #include < pthread.h>
454454
455- int main()
455+ int main(void )
456456 {
457457 pthread_create(0 , 0 , 0 , 0 );
458458 return 0 ;
@@ -494,7 +494,7 @@ struct
494494 compiles context {|
495495 #include < sys/ eventfd.h>
496496
497- int main()
497+ int main(void )
498498 {
499499 eventfd(0 , 0 );
500500 return 0 ;
@@ -511,7 +511,7 @@ struct
511511 #include < sys/ types.h>
512512 #include < sys/ socket.h>
513513
514- int main()
514+ int main(void )
515515 {
516516 struct msghdr msg;
517517 msg.msg_controllen = 0 ;
@@ -531,7 +531,7 @@ struct
531531 #define _GNU_SOURCE
532532 #include < sched.h>
533533
534- int main()
534+ int main(void )
535535 {
536536 sched_getcpu() ;
537537 return 0 ;
@@ -549,7 +549,7 @@ struct
549549 #define _GNU_SOURCE
550550 #include < sched.h>
551551
552- int main()
552+ int main(void )
553553 {
554554 sched_getaffinity(0 , 0 , 0 );
555555 return 0 ;
@@ -562,7 +562,7 @@ struct
562562 #include < sys/ types.h>
563563 #include < sys/ socket.h>
564564
565- int main()
565+ int main(void )
566566 {
567567 struct | } ^ struct_name ^ {| cred;
568568 socklen_t cred_len = sizeof(cred);
@@ -612,7 +612,7 @@ struct
612612 #include < sys/ types.h>
613613 #include < unistd.h>
614614
615- int main()
615+ int main(void )
616616 {
617617 uid_t euid;
618618 gid_t egid;
@@ -630,7 +630,7 @@ struct
630630 compiles context {|
631631 #include < unistd.h>
632632
633- int main()
633+ int main(void )
634634 {
635635 int (* fdatasyncp)(int) = fdatasync;
636636 fdatasyncp(0);
@@ -650,7 +650,7 @@ struct
650650 #include <netdb.h>
651651 #include <stddef.h>
652652
653- int main()
653+ int main(void )
654654 {
655655 int x;
656656 x =
@@ -733,7 +733,7 @@ struct
733733 #define NON_R_GETHOSTBYNAME 1
734734 #endif
735735
736- int main()
736+ int main(void )
737737 {
738738 #if defined(NON_R_GETHOSTBYNAME ) || defined(NON_R_GETHOSTBYNAME )
739739 #error " not available"
@@ -750,7 +750,7 @@ struct
750750 #include < sys/ stat.h>
751751 #include < unistd.h>
752752
753- int main() {
753+ int main(void ) {
754754 struct stat * buf;
755755 double a, m, c;
756756 a = (double)buf->st_a| } ^ projection ^ {| ;
@@ -790,9 +790,9 @@ struct
790790 #include < unistd.h>
791791 #include < sys/ mman.h>
792792
793- int main()
793+ int main(void )
794794 {
795- int (* mincore_ptr)(void*, size_t, unsigned char*) = mincore;
795+ int (* mincore_ptr)(const void*, size_t, char*) = mincore;
796796 return (int )(mincore_ptr == NULL );
797797 }
798798 | }
@@ -808,7 +808,7 @@ struct
808808 #include < sys/ socket.h>
809809 #include < stddef.h>
810810
811- int main()
811+ int main(void )
812812 {
813813 accept4(0 , NULL , 0 , 0 );
814814 return 0 ;
0 commit comments