Ticket #133 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

geolib.h:636: warning: conflicting types for built-in function ‘round’

Reported by: baker Owned by: somebody
Priority: minor Milestone:
Component: ALL modules Version:
Keywords: math.h, round Cc:


gcc version 4.2.1 (Mac OS X 10.5.8) issues warnings like:

In file included from archman.c:32:
lib/geolib.h:636: warning: conflicting types for built-in function ‘round’

This is because src/archiving/archman/lib/geolib.h contains a function prototype declaration for an undefined, and unused, round() function which conflicts with the C library round() function declared in math.h. The fix is to remove (shown commented-out here) the declaration of round() in src/archiving/archman/lib/geolib.h at line 636:

void restart_signal_handler (int sig_no);
#long round (double amount);
int run_programme (char *, int, int, struct Redirection *);

Change History

comment:1 Changed 10 years ago by paulf

  • Status changed from new to closed
  • Resolution set to fixed

cleaned up warning in r4493

comment:2 Changed 10 years ago by baker


I didn't mean to suggest commenting out round() was the best choice here -- it was just for illustration to show which line was causing the problem. I prefer to delete the round() line entirely. (I've started including patches now to show exactly what I changed.) Leaving it as a comment is misleading: there is no round() defined anywhere in archman and it is not used at all; it's just cruft.

Note: See TracTickets for help on using tickets.