2 ** test of standard library
5 int compare (int x
, int y
)
11 char *compare2 (int x
, int y
)
20 exit ("hullo"); /* 1. Function exit expects arg 1 to be int gets char * */
21 exit (i
); /* 2. Unreachable code */
25 print (char *s
, FILE *f
)
33 c
= fgetc(f
); /* 3. Assignment of int to char: c = fgetc(f) */
34 c
= getc (f
); /* 4. Assignment of int to char: c = getc(f) */
44 /*@-null@*/ /* suppress errors for passing NULL's */
46 (void) bsearch (NULL
, NULL
, sizeof(int), compare
) ; /* 5, 6 */
47 (void) bsearch (NULL
, NULL
, sizeof(int), sizeof(int), (int (*) ()) compare
) ; /* ok */
48 bsearch (NULL
, NULL
, sizeof(int), sizeof(int), (char (*) ()) compare2
) ; /* 7, 8 */
51 qsort (NULL
, x
, x
, (int (*)()) compare
);
52 qsort (x
, x
, x
, (char (*)()) compare2
); /* 9, 10. */
54 signal (SIGHUP
, compare
); /* 11. */
55 signal (SIGHUP
, leave
);