Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Compiling the server ➜ Conflicting types for built in function

Conflicting types for built in function

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Robert Powell   Australia  (367 posts)  Bio
Date Sun 06 Mar 2005 08:52 AM (UTC)

Amended on Wed 23 Mar 2005 08:35 PM (UTC) by Nick Gammon

Message
Im getting this warning for the function logf, in a rom derivitive Ghost Mud 3.0.

in merc.h
void     logf             args((char *fmt, ...));
in comm.c
void logf (char *fmt, ...)
{
  char buf[2 * MSL];
  va_list args;
  va_start (args, fmt);
  vsprintf (buf, fmt, args);
  va_end (args);

  log_string (buf);
}

I dont realy understand what the warning means(am looking it
up now on the net) nor do i know how to go about fixing it.
Thanks all for your time and help, in advance.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Sun 06 Mar 2005 09:08 AM (UTC)
Message
Logf is a builtin function for floating-point logarithms. The warning is telling you that your function has the same name but different types.

To fix it, you'll most likely have to give your function some other name, such as logprintf.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,991 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.