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

Reset loopback_client_num_packets_received before test. #75

Merged
merged 1 commit into from Nov 15, 2018

Conversation

Projects
None yet
2 participants
@drichardson
Contributor

drichardson commented Nov 15, 2018

premake5 scan-build reported the following warning:

In file included from test.cpp:28:
./netcode.c:8560:5: warning: Value stored to 'loopback_server_num_packets_received' is never read
loopback_server_num_packets_received = 0;

This looks like a copy/paste error that was added in 43e6c76 affecting the loopback test. While the test was passing, and still pass after this change, the test wasn't actually checking the receive count as intended (since it wasn't reset to 0 before the test).

After fix, scan-build shows:

scan-build: Removing directory '/tmp/scan-build-2018-11-14-161711-21680-1' because it contains no reports.
scan-build: No bugs found.

@gafferongames

This comment has been minimized.

Member

gafferongames commented Nov 15, 2018

Nice find. thank you.

@gafferongames gafferongames merged commit 5f166b6 into networkprotocol:master Nov 15, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@drichardson drichardson deleted the drichardson:fix-scan-build-warning branch Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment