Skip to content

Commit

Permalink
Merge pull request #39 from dosbox-staging/dosbox-staging/cleanup-2
Browse files Browse the repository at this point in the history
Cleanup a couple remaining compiler warnings
  • Loading branch information
inlife authored Jul 30, 2022
2 parents 0d88876 + a0f5cb0 commit 1eea96c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions include/enet.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#define ENET_VERSION_MAJOR 2
#define ENET_VERSION_MINOR 3
#define ENET_VERSION_PATCH 2
#define ENET_VERSION_PATCH 3
#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF)
#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF)
Expand Down Expand Up @@ -3859,7 +3859,7 @@ extern "C" {
* @param pingInterval the interval at which to send pings; defaults to ENET_PEER_PING_INTERVAL if 0
*/
void enet_peer_ping_interval(ENetPeer *peer, enet_uint32 pingInterval) {
peer->pingInterval = pingInterval ? pingInterval : ENET_PEER_PING_INTERVAL;
peer->pingInterval = pingInterval ? pingInterval : (enet_uint32)ENET_PEER_PING_INTERVAL;
}

/** Sets the timeout parameters for a peer.
Expand All @@ -3880,9 +3880,9 @@ extern "C" {
*/

void enet_peer_timeout(ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum) {
peer->timeoutLimit = timeoutLimit ? timeoutLimit : ENET_PEER_TIMEOUT_LIMIT;
peer->timeoutMinimum = timeoutMinimum ? timeoutMinimum : ENET_PEER_TIMEOUT_MINIMUM;
peer->timeoutMaximum = timeoutMaximum ? timeoutMaximum : ENET_PEER_TIMEOUT_MAXIMUM;
peer->timeoutLimit = timeoutLimit ? timeoutLimit : (enet_uint32)ENET_PEER_TIMEOUT_LIMIT;
peer->timeoutMinimum = timeoutMinimum ? timeoutMinimum : (enet_uint32)ENET_PEER_TIMEOUT_MINIMUM;
peer->timeoutMaximum = timeoutMaximum ? timeoutMaximum : (enet_uint32)ENET_PEER_TIMEOUT_MAXIMUM;
}

/** Force an immediate disconnection from a peer.
Expand Down Expand Up @@ -4904,8 +4904,7 @@ extern "C" {
t.QuadPart |= f.dwLowDateTime;
return (t);
}

int clock_gettime(int X, struct timespec *tv) {
int clock_gettime(int /* X */, struct timespec *tv) {
LARGE_INTEGER t;
FILETIME f;
double microseconds;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enet.c",
"version": "2.3.2",
"version": "2.3.3",
"description": "ENet - Simple, lightweight and reliable UDP networking library written on pure C.",
"main": "include/enet.h",
"directories": {
Expand Down

0 comments on commit 1eea96c

Please sign in to comment.