home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!concert!duke!news.duke.edu!acpub.duke.edu!tcamp
- From: tcamp@acpub.duke.edu (Ted A. Campbell)
- Newsgroups: gnu.gcc.help
- Subject: Help with GCC -ansi signal() parameter
- Message-ID: <5105@news.duke.edu>
- Date: 4 Sep 92 12:22:12 GMT
- Sender: news@news.duke.edu
- Lines: 34
- Nntp-Posting-Host: raphael.acpub.duke.edu
-
- I'm receiving a warning message when I compile the following bit
- of code. The message is that the second parameter to signal()
- ("handler") is of an incompatible type. I'm using the command
- line "gcc -O -ansi filename.c" to compile this. I've tried
- making the interrupt handler return void rather than int,
- but the warning message persists. The program seems to work
- ok (this is of course extracted from a larger program), but
- I'd like to know how I can avoid this error message.
-
- Ted Campbell
- Duke University
- tcamp@acpub.duke.edu
-
- code follows:
-
- #include "stdio.h"
- #include "stdlib.h"
- #include "signal.h"
-
- extern int handler( void );
-
- void
- main( argc, argv )
- int argc;
- char **argv;
- {
- signal( SIGINT, handler );
- }
-
-
- int
- handler( void )
- {
- }
-