1
0
mirror of https://github.com/fumiama/simple-dict.git synced 2026-06-10 13:10:31 +08:00

remove warnings

This commit is contained in:
源文雨
2022-04-04 14:49:30 +08:00
parent 9e0b4ffc18
commit fdeb306c9b
5 changed files with 17 additions and 15 deletions

View File

@@ -11,6 +11,7 @@
#include <arpa/inet.h>
#include <sys/stat.h>
#include <pthread.h>
#include <unistd.h>
#include "crypto.h"
#if !__APPLE__
@@ -83,7 +84,7 @@ void getMessage(void *p) {
} else {
offset += c;
#ifdef DEBUG
printf("[handle] Get %zd bytes, total: %zd.\n", c, offset);
printf("[handle] Get %d bytes, total: %d.\n", c, offset);
#endif
if(offset < CMDPACKET_HEAD_LEN) break;
if(offset < CMDPACKET_HEAD_LEN+cp->datalen) {
@@ -92,14 +93,14 @@ void getMessage(void *p) {
else {
offset += c;
#ifdef DEBUG
printf("[handle] Get %zd bytes, total: %zd.\n", c, offset);
printf("[handle] Get %d bytes, total: %d.\n", c, offset);
#endif
}
}
c = CMDPACKET_HEAD_LEN+cp->datalen; // 暂存 packet len
if(offset < c) break;
#ifdef DEBUG
printf("[handle] Decrypt %zd bytes data...\n", cp->datalen);
printf("[handle] Decrypt %d bytes data...\n", (int)cp->datalen);
#endif
if(cmdpacket_decrypt(cp, 0, pwd)) {
cp->data[cp->datalen] = 0;
@@ -119,7 +120,7 @@ void getMessage(void *p) {
c = 0;
} else offset = 0;
#ifdef DEBUG
printf("offset after analyzing packet: %zd\n", offset);
printf("offset after analyzing packet: %d\n", offset);
#endif
}
}