mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Remove warnings on Windows
This commit is contained in:
@@ -110,7 +110,7 @@ bad:
|
||||
}
|
||||
|
||||
if (hex) {
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < len; i++) {
|
||||
fprintf(outfp, "%02X", buf[i]);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ int sdfdecrypt_main(int argc, char **argv)
|
||||
SDF_CBC_CTX ctx;
|
||||
const uint8_t *p;
|
||||
SM2_CIPHERTEXT ciphertext;
|
||||
uint8_t *wrappedkey;
|
||||
size_t wrappedkey_len;
|
||||
|
||||
memset(&dev, 0, sizeof(dev));
|
||||
|
||||
@@ -2033,8 +2033,6 @@ static int speed_SDF_InternalEncrypt_ECC(int key)
|
||||
unsigned char ucData[32] = {1}; // same as sm2_enctest.c
|
||||
unsigned int uiDataLength = (unsigned int)sizeof(ucData);
|
||||
ECCCipher eccCipher;
|
||||
unsigned char ucDecData[256];
|
||||
unsigned int uiDecDataLength;
|
||||
clock_t begin, end;
|
||||
double seconds;
|
||||
int i, ret;
|
||||
|
||||
@@ -597,7 +597,11 @@ bad:
|
||||
}
|
||||
|
||||
if (!(hp = gethostbyname(host))) {
|
||||
#ifdef WIN32
|
||||
fprintf(stderr, "%s: parse -host value error: %d\n", prog, WSAGetLastError());
|
||||
#else
|
||||
fprintf(stderr, "%s: parse -host value error: %s\n", prog, hstrerror(h_errno));
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
server.sin_addr = *((struct in_addr *)hp->h_addr_list[0]);
|
||||
|
||||
@@ -456,9 +456,6 @@ bad:
|
||||
puts("start listen ...\n");
|
||||
tls_socket_listen(sock, 1);
|
||||
|
||||
|
||||
restart:
|
||||
|
||||
//client_addrlen = sizeof(client_addr);
|
||||
if (tls_socket_accept(sock, &client_addr, &conn_sock) != 1) {
|
||||
fprintf(stderr, "%s: socket accept error\n", prog);
|
||||
|
||||
Reference in New Issue
Block a user