Fix a warning and silence one we won't be able to avoid

This commit is contained in:
Zaela 2015-11-19 05:04:10 -08:00
parent a6e76742e0
commit 59ac17a6eb
4 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
CC?= gcc
CFLAGS= -O2 -Wall
CFLAGS= -O2 -Wall -Wno-strict-aliasing
BINDIR= ./bin/
SRCDIR= ./src/
OBJDIR= ./build/

View file

@ -57,7 +57,7 @@ void connection_close(Connection* con)
void connection_read(Connection* con)
{
Address addr;
int addrLen = sizeof(Address);
socklen_t addrLen = sizeof(Address);
int len;
time_t recvTime;

View file

@ -29,6 +29,8 @@
#ifndef _WIN32
#define closesocket close
#define INVALID_SOCKET -1
#else
typedef int socklen_t;
#endif
#endif/*_P99LOGIN_NETCODE_H_*/

View file

@ -87,7 +87,6 @@ void sequence_recv(Connection* con, uint8_t* data, int len, int isFragment)
{
Sequence* seq = &con->sequence;
uint16_t val = get_sequence(data);
uint8_t* copy;
uint32_t index;
Packet* p;
@ -169,8 +168,7 @@ void check_fragment_finished(Connection* con)
uint32_t index = seq->fragStart;
int got;
Packet* p;
//int n = seq->fragmentLen / 512;
int n = (seq->fragmentLen - (512 - 8)) / (512 - 4) + 2;
int n = (seq->fragmentLen - (512 - 8)) / (512 - 4) + 2;
int count = 1;
p = &seq->packets[index];