-
Notifications
You must be signed in to change notification settings - Fork 116
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
Compilation issue #36
Labels
Comments
Hi, This is the same issue described here: #17 It's just a warning about ignoring return value of fgets() function. You can either ignore the warning (should be okay) or download and build Develop branch which has this issue fixed. Or if you want to patch it yoursef, you could replace line: Line 752 in 8fdda29
with the fix from Develop branch: Lines 688 to 690 in af5e88b
|
Tiiffi,
Thanks for the extremely prompt response! I'm a Linux tinkerer, not so
much a developer. I'm also new to GitHub. I'm following a tutorial online
with my son to set up a Minecraft server.
The -Wno-error flag didn't work for me. I patched the code as you
described, and it compiled without issue.
Thanks again!
Micah
…On Sun, Dec 22, 2019 at 8:55 AM Tiiffi ***@***.***> wrote:
Hi,
This is the same issue described here: #17
<#17>
It's just a warning about ignoring return value of fgets() function.
You can either ignore the warning (should be okay) or download and build
Develop <https://github.com/Tiiffi/mcrcon/tree/develop> branch which has
this issue fixed.
Or if you want to patch it yoursef, you could replace line:
https://github.com/Tiiffi/mcrcon/blob/8fdda295e2711571d3f68fe57079ee15003ee150/mcrcon.c#L752
with the fix from Develop branch:
https://github.com/Tiiffi/mcrcon/blob/af5e88b528136f30efd7a86eee1bffb795eb36e3/mcrcon.c#L688-L690
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#36?email_source=notifications&email_token=AODG4VQKFIRNB6T2JPYT5Q3QZ55VZA5CNFSM4J6MAXR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHPR2WA#issuecomment-568270168>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AODG4VQYK5H4NKMDTJR34B3QZ55VZANCNFSM4J6MAXRQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Howdy,
I'm trying to compile mcrcon, the latest version, and am getting the following error:
cc -std=gnu99 -Wall -Wextra -Wpedantic -Os -s -fstack-protector-strong -o mcrcon mcrcon.c
mcrcon.c: In function ‘get_line’:
mcrcon.c:752:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
(void) fgets(buffer, bsize, stdin);
Can you help me out?
Thanks.
The text was updated successfully, but these errors were encountered: