[Rpm-maint] [rpm-software-management/rpm] build: fgetc returns int, not char. (#82)

rwmjones notifications at github.com
Mon Aug 22 07:55:36 UTC 2016

Returning the value into a char is a mistake on all platforms, but is
particularly bad on RISC-V.  On that platform (like ARM) char is
unsigned.  Therefore EOF (-1) is returned as 255, and the subsequent
test 'c == EOF' ('255 == -1') fails causing an infinite loop.

Signed-off-by: Richard W.M. Jones <rjones at redhat.com>
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * build: fgetc returns int, not char.

-- File Changes --

    M build/parseSpec.c (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20160822/ac388fb1/attachment.html>

More information about the Rpm-maint mailing list