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

dev_t and (struct stat).st_rdev



Hello,

I'm having trouble figuring out why this build fails on mips and mipsel:

https://buildd.debian.org/fetch.cgi?pkg=python-llfuse&arch=mips&ver=0.33-1&stamp=1310240989&file=log

The crucial errors seems to be:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fPIC -g -I/usr/include/python2.7 -c src/llfuse.c -o build/temp.linux-mips-2.7/src/llfuse.o -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -DFUSE_USE_VERSION=28 -DLLFUSE_VERSION="0.33" -Werror -Wall -Wextra -Wconversion -Wno-unused-parameter -Wno-sign-conversion -Wno-unused-but-set-variable -fno-strict-aliasing -DHAVE_STRUCT_STAT_ST_ATIM
src/llfuse.c: In function '__pyx_f_6llfuse_fill_c_stat':
src/llfuse.c:15782:3: error: conversion to 'long unsigned int' from 'dev_t' may alter its value [-Werror=conversion]
cc1: all warnings being treated as errors

Now, llfuse.c is itself code generated by Cython, so it's hard to read.
However, the assignment that gcc complains about is just this:

static  PyObject *__pyx_f_6llfuse_fill_c_stat(PyObject *__pyx_v_attr, struct stat *__pyx_v_stat) {
  [...]
  dev_t __pyx_t_7;
  [...]
  __pyx_v_stat->st_rdev = __pyx_t_7;

i.e., I'm assigning dev_t to the st_rdev attribute of struct stat.

Why does this require a conversion on mips?


Thanks,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


Reply to: