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

Re: Is it OK to have compile warnings



On Wed, Oct 23, 2013 at 9:41 AM, Tong Sun wrote:

> Is it OK to have compile warnings when building a package? If not,

It is fairly normal to have compile warnings since GCC gets stricter over time.

> how can I fix the following:
>
> dial.c: In function 'main':
> dial.c:273:8: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
>    write(fd, buf, bufidx);
>
> I got a bunch of such ignoring-return-value warnings.

Report a bug upstream and ask them to fix it. Bonus points for reading
the C code, changing it to check the return value of write() as
appropriate and send upstream a patch.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


Reply to: