On 26/09/13 11:07, Immanuel Weber wrote:
Hi Martin, yesterday I allmost finished that modification. This morning a simpler solution came to my mind: just include the efd.h header in device.c and exchange the use of int for the file descriptors there from to nn_fd. The patch for that is below, if you prefer your proposed solution, I can provide a patch for that too.
Yes, please. There's no point in introducing a dependency between efd and device. Let them rather both depend on nn_fd.
p.s. there are some compiler warnings about conversions scattered across the project (regardless of the patch), where data loss can happen. Some of them are quite severe, like size_t to uint8_t, which is on my machine a 8 to 1 byte conversion. I will try have a look at some of them.
Right. I would say an assert and an explicit cast would work in such case: size_t sz; ... nn_assert (sz < 256); uint8_t c = (uint8_t) sz; Martin