NO

Author Topic: Warning #2027 Question  (Read 2111 times)

tbohon

  • Guest
Warning #2027 Question
« on: March 08, 2010, 07:25:46 PM »
Following is a section of code which shows prototypes matching the actual declarations further down in the code:

Code: [Select]
/* function declarations */
void    getinput(),
        output(),
        initialization(),
        arrival_event(),
        departure_event();
double  exponential(double),
        interarrivaltime(),
        servicetime();
event  *create_event(),
       *next_event();
void    add_event(event *),
        destroy_event(event *);
job    *create_job(),
       *next_job();
void    destroy_job(job *),
        add_job(job *);

int main()
{
    event  *pntr;

    getinput();
    initialization();

Here are the warnings I'm receiving on compile:

Code: [Select]
Building mm1_queue.obj.
C:\cwork\mm1_queue.c(92): warning #2027: Missing prototype for 'getinput'.
C:\cwork\mm1_queue.c(98): warning #2027: Missing prototype for 'output'.
C:\cwork\mm1_queue.c(105): warning #2027: Missing prototype for 'initialization'.
C:\cwork\mm1_queue.c(126): warning #2027: Missing prototype for 'arrival_event'.
C:\cwork\mm1_queue.c(150): warning #2027: Missing prototype for 'departure_event'.
C:\cwork\mm1_queue.c(176): warning #2027: Missing prototype for 'interarrivaltime'.
C:\cwork\mm1_queue.c(181): warning #2027: Missing prototype for 'servicetime'.
C:\cwork\mm1_queue.c(187): warning #2027: Missing prototype for 'create_event'.
C:\cwork\mm1_queue.c(206): warning #2027: Missing prototype for 'next_event'.
C:\cwork\mm1_queue.c(245): warning #2027: Missing prototype for 'create_job'.
C:\cwork\mm1_queue.c(264): warning #2027: Missing prototype for 'next_job'.

Since the prototypes are outside of and before the declaration of main() I don't understand why I'm getting these errors.

Comments/thoughts/suggestions appreciated and I thank you in advance.

Tom

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Warning #2027 Question
« Reply #1 on: March 08, 2010, 07:45:37 PM »
This way:
void getinput(void);
May the source be with you