Follow-up Comment #2, bug #16318 (project freeciv):

The scanf
if (sscanf(level_str, "%d", (int *) &level) != 1) {
lines can be fixed by an auxiliary temp variable. Or perhaps an atoi with
error checking.

When passing pointers of different type to functions
sg_failure_ret(secfile_lookup_int(loading->file, (int *) &ship->state,
the function prototype can be changed from taking (int *) or (void *) to
(char *)

The C99 standard says that, as an exception, a pointer to char can be aliased
(section 6.5.7)

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16318>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to