Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!davis From: davis@pacific.mps.ohio-state.edu ("John E. Davis") Newsgroups: comp.lang.c Subject: Why does lint complain? Message-ID: Date: 17 Feb 91 21:52:36 GMT Sender: news@pacific.mps.ohio-state.edu Reply-To: davis@pacific.mps.ohio-state.edu (John E. Davis) Distribution: comp Organization: "Dept. of Physics, The Ohio State University" Lines: 43 Hi, Here is a sample program: #include #include void getime() { time_t cur_time; (void) time(&cur_time); (void) printf("\nThis is running on %s\n", ctime(&cur_time)); } int main() { getime(); exit(0); return(0); } Now here is the lint output: [pacific]>lint test.c test.c(9): warning: c may be used before set test.c(9): warning: cur_time may be used before set time value declared inconsistently llib-lc(729) :: test.c(10) exit value declared inconsistently llib-lc(232) :: test.c(19) [pacific]> So, why is lint complaining and how seriously should I take these complaints? Thanks, -- John bitnet: davis@ohstpy internet: davis@pacific.mps.ohio-state.edu