[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Inconsistency about struct stat and dev_t on mips and mipsel



Hi,

i am pinging about:
  https://lists.debian.org/debian-mips/2011/11/msg00006.html


Since quite a while the buildd logs of libisoburn on mips and
mipsel show a riddling warning, which may actually indicate a
serious bug in the resulting binaries:

  https://buildd.debian.org/status/fetch.php?pkg=libisoburn&arch=mips&ver=1.4.0-3&stamp=1442236259

  xorriso/iso_tree.c: In function 'Xorriso_fake_stbuf':
  xorriso/iso_tree.c:282:47: warning: passing argument 4 of 'Xorriso_node_get_dev' from incompatible pointer type [-Wincompatible-pointer-types]
      Xorriso_node_get_dev(xorriso, *node, path, &(stbuf->st_rdev), 0);
                                               ^
  xorriso/iso_tree.c:229:5: note: expected 'dev_t * {aka long long unsigned int *}' but argument is of type 'long unsigned int *'
   int Xorriso_node_get_dev(struct XorrisO *xorriso, IsoNode *node,

The inconsistency is that "stbuf" is declared as
  struct stat *stbuf
and POSIX compliant man 2 stat declares 
  struct stat {
      ...
      dev_t     st_rdev;        /* device ID (if special file) */
      ...
  };

Source state of the most recent buildd run:
  http://libburnia-project.org/browser/libisoburn/trunk/xorriso/iso_tree.c?rev=5391


So how come the warning and possible nasty size mismatch ?


Have a nice day :)

Thomas


Reply to: