Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!sri-spam!ames!aurora!labrea!decwrl!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: goto's and switch statements -- mild proposal Message-ID: <27189@sun.uucp> Date: Thu, 3-Sep-87 15:14:14 EDT Article-I.D.: sun.27189 Posted: Thu Sep 3 15:14:14 1987 Date-Received: Sat, 5-Sep-87 12:17:01 EDT References: <855@tjalk.cs.vu.nl> <2683@hoptoad.uucp> <916@haddock.ISC.COM> <869@tjalk.cs.vu.nl> Sender: news@sun.uucp Lines: 28 > Oh yeah? How about the message I get for EVERY casted malloc or realloc: > > :: somefile.c(007): warning: possible pointer alignment problem > > Can't shut lint up about that. Don't use the "-p" or "-h" flag, and you won't get it, unless somebody's monkeyed with that part of "lint". Unfortunately, "-h" is quite useful for other reasons. Perhaps with the advent of ANSI C "lint" will be convinced not to complain about converting "void *" to pointers of other types; there are both advantages and disadvantages to this. Another possibility would be to use "grep" to strip those messages out. > BTW. Does anybody know how to stop lint complaining about functions > returning values wich are always/sometimes ignored? I get one for every > time I use sprintf, fclose, strcpy and quite a few others! > [ OK, I meant another way than indeed using the values. > I just don't need them (always)! ] If your compiler supports "void", try casting the result to "void", e.g. (void) strcpy(buffer, string); Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com