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

Fixed compiler error #53

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Fixed compiler error #53

merged 1 commit into from
Feb 12, 2021

Conversation

AddisonG
Copy link
Contributor

This fixes the compiler error that is thrown when compiling with: gcc -std=gnu11 -pedantic -Wall -Wextra -O2 -s -o mcrcon mcrcon.c.

This would never have been an issue, because of the check on line 568, but the compiler still complains. This will make it happy.

mcrcon.c: In function ‘packet_build’:
mcrcon.c:576:2: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
  strncpy(packet.data, s1, DATA_BUFFSIZE);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This fixes the compiler issue:

```
mcrcon.c: In function ‘packet_build’:
mcrcon.c:576:2: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
  strncpy(packet.data, s1, DATA_BUFFSIZE);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@Tiiffi Tiiffi changed the base branch from master to develop February 12, 2021 02:09
@Tiiffi
Copy link
Owner

Tiiffi commented Feb 12, 2021

Will merge into develop branch.

Overall this part of the code seems to be quite wonky and needs more attention.

@Tiiffi Tiiffi merged commit 29a1c99 into Tiiffi:develop Feb 12, 2021
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

Successfully merging this pull request may close these issues.

2 participants