How do I get rid of this warning?

Jan-Jaap van der Geer janjaap at dsv.nl
Sun Jan 7 21:52:52 GMT 2007


Hello,

When using GCC to compile this program:

#include "oslib/osword.h"
#include "oslib/territory.h"

int main(void)
{
  oswordreadclock_utc_block utc;
  territory_ordinals        ordinals;

  utc.op = oswordreadclock_OP_UTC;
  xoswordreadclock_utc (&utc);

  xterritory_convert_time_to_ordinals (territory_CURRENT,
                                       &utc.utc,
                                       &ordinals);
}

I get the warning:

warning: passing arg 2 of `xterritory_convert_time_to_ordinals'
from incompatible pointer type

I suppose this is why: http://c-faq.com/ansi/constmismatch.html

How should I do this without reverting to ignoring/turning off the
warning or casting explicitly to a (os_date_and_time const *) ?

Cheers,
Jan-Jaap



More information about the oslib-user mailing list