Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Syntax Issues in the /libpng/contrib/gregbook #564

Open
Gwihwan-Go opened this issue Jun 3, 2024 · 1 comment
Open

Minor Syntax Issues in the /libpng/contrib/gregbook #564

Gwihwan-Go opened this issue Jun 3, 2024 · 1 comment

Comments

@Gwihwan-Go
Copy link

Hi!
There are some minor grammar issues in the /libpng/contrib/gregbook

/libpng/contrib/gregbook/readpng.c:269:16: 
[error:[Unmatched '('. Configuration: ''. [syntaxError]
[0mfprintf(stderr, "readpng:  image_data buffer would be too large\n",

/libpng/contrib/gregbook/rpng-win.c:190:5: 
[warning:[Return value of function freopen() is not used. 
[ignoredReturnValue][0mfreopen("CONOUT$", "a", stderr);

[1m../libpng/contrib/gregbook/rpng-win.c:596:5: 
[warning:[%ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint]
[Trace((stderr, "(width = %ld, rowbytes = %ld, wimage_rowbytes = %d)\n",
@jbowler
Copy link
Member

jbowler commented Sep 14, 2024

Glenn 53f22ae "Document need to check for integer overflow when allocating a pixel...", suggested by Jaeseung Choi.

Clearly no one has ever tried to compile this code (the lines in question were straight adds; "," at the end rather than ");")

@ctruta: perhaps remove contrib/gregbook? This code used to compile and be tested (by Glenn) but this change has been there since 2019 and, apparently, someone only noticed five years later!

Time for it to go.

for f in contrib/*/*.c; do gcc -c "$f" 2>/dev/null || echo "$f does not compile"; done

Some of them don't compile because of headers, like "<windows.h>" but maybe half don't compile because they have been broken and have never been tested since. These need to go!vi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants