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

Ubuntu 16.04, compile warning for squirrel.cpp #6981

Closed
auge8472 opened this issue Nov 26, 2018 · 1 comment
Closed

Ubuntu 16.04, compile warning for squirrel.cpp #6981

auge8472 opened this issue Nov 26, 2018 · 1 comment

Comments

@auge8472
Copy link
Contributor

auge8472 commented Nov 26, 2018

Compiled JGRPP 0.28.0 a few days ago under Ubuntu 16.04.5 and got a compiler warning.

[SRC] Compiling script/squirrel.cpp
/home/auge/Projekte/OpenTTD-patches/Arbeitskopie/src/script/squirrel.cpp: In member function ‘SQRESULT Squirrel::LoadFile(HSQUIRRELVM, const char*, SQBool)’:
/home/auge/Projekte/OpenTTD-patches/Arbeitskopie/src/script/squirrel.cpp:452:36: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&bom, 1, sizeof(bom), file); // Inside tar, no point checking return va
                                    ^
/home/auge/Projekte/OpenTTD-patches/Arbeitskopie/src/script/squirrel.cpp:490:35: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&uc, 1, sizeof(uc), file);
                                   ^

I filed an issue in JGRs repo (see JGRennison/OpenTTD-patches#70) in a first step. JGR suspects the commit 6accbf9 of the OpenTTD repo as the cause of the warning. Do you need any further information?

@nielsmh
Copy link
Contributor

nielsmh commented Jan 6, 2019

Fixed in #7013

@nielsmh nielsmh closed this as completed Jan 6, 2019
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