Skip to content

Commit

Permalink
fix warnings for g++ build
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Jul 5, 2023
1 parent 469efd6 commit 57f0780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/wolfsshd/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ static int AddRestrictedCase(WOLFSSHD_CONFIG* config, const char* mtch,
int ret = WS_SUCCESS;
char* pt;

pt = XSTRSTR(value, mtch);
pt = (char*)XSTRSTR(value, mtch);
if (pt != NULL) {
int sz, i;

Expand Down
8 changes: 4 additions & 4 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)

if (ret == WS_SUCCESS) {
wc_HashAlg* hash = &ssh->handshake->kexHash;
enum wc_HashType hashId = ssh->handshake->kexHashId;
enum wc_HashType hashId = (enum wc_HashType)ssh->handshake->kexHashId;
byte scratchLen[LENGTH_SZ];
word32 strSz;

Expand Down Expand Up @@ -3917,7 +3917,7 @@ static int DoKexDhReply(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
}

hash = &ssh->handshake->kexHash;
hashId = ssh->handshake->kexHashId;
hashId = (enum wc_HashType)ssh->handshake->kexHashId;

if (ret == WS_SUCCESS) {
/* Hash in the raw public key blob from the server including its
Expand Down Expand Up @@ -5277,7 +5277,7 @@ static int DoUserAuthRequestRsaCert(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk,
if (ret == 0) {
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
if (ret == LENGTH_ONLY_E) {
pub = WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
pub = (byte*)WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
if (pub == NULL) {
ret = WS_MEMORY_E;
}
Expand Down Expand Up @@ -5610,7 +5610,7 @@ static int DoUserAuthRequestEccCert(WOLFSSH* ssh, WS_UserAuthData_PublicKey* pk,
if (ret == 0) {
ret = wc_GetPubKeyDerFromCert(&cert, NULL, &pubSz);
if (ret == LENGTH_ONLY_E) {
pub = WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
pub = (byte*)WMALLOC(pubSz, ssh->ctx->heap, DYNTYPE_PUBKEY);
if (pub == NULL) {
ret = WS_MEMORY_E;
}
Expand Down

0 comments on commit 57f0780

Please sign in to comment.