Path: utzoo!attcan!uunet!steinmetz!ge-dab!ge-rtp!edison!rja From: rja@edison.GE.COM (rja) Newsgroups: comp.lang.c Subject: ANSI C function declaration prototypes Keywords: ANSI, C, functions Message-ID: <1776@edison.GE.COM> Date: 17 Jan 89 16:23:07 GMT Distribution: na Organization: GE-Fanuc North America Lines: 29 I am trying to revise some code to make it more maintainable. As part of this, I am trying to correctly have the code use ANSI C function prototypes. I've got a couple of questions that I can't seem to find the answer to in references at hand. 1) How should I declare a function using prototypes when that function has no parameters ?? example: int foo(); My compiler sees no parameters and generates a warning about the lack of ANSI function prototypes. 2) How should I declare a function which truly returns nothing ? My first thought was to declare "void foo();" but that still causes my compiler to warn about a function with no return value when it compiles the function definition. Perhaps these are cases where the programmer should just ignore the compiler warnings, but I'd really like to have a minimum number ( preferably zero) of warnings. Ran ______________________________________________________________________________ rja@edison.GE.COM or ...uunet!virginia!edison!rja via Internet (preferable) via uucp (if you must) ______________________________________________________________________________