Skip to content

Commit d125176

Browse files
committed
fix compiler warnings when HAVE_PK_CALLBACKS is not defined
1 parent b4bb2d9 commit d125176

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

native/com_wolfssl_WolfSSLSession.c

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2789,8 +2789,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccSignCtx
27892789

27902790
void* eccSignCtx;
27912791
internCtx* myCtx;
2792-
#endif
27932792
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
2793+
#endif
27942794

27952795
/* find exception class in case we need it */
27962796
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -2851,6 +2851,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccSignCtx
28512851

28522852
wolfSSL_SetEccSignCtx(ssl, myCtx);
28532853
#else
2854+
(void)jcl;
2855+
(void)sslPtr;
28542856
(*jenv)->ThrowNew(jenv, excClass,
28552857
"wolfSSL not compiled with PK Callbacks and/or ECC");
28562858
return;
@@ -2866,8 +2868,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccVerifyCtx
28662868

28672869
void* eccVerifyCtx;
28682870
internCtx* myCtx;
2869-
#endif
28702871
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
2872+
#endif
28712873

28722874
/* find exception class in case we need it */
28732875
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -2928,6 +2930,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccVerifyCtx
29282930

29292931
wolfSSL_SetEccVerifyCtx(ssl, myCtx);
29302932
#else
2933+
(void)jcl;
2934+
(void)sslPtr;
29312935
(*jenv)->ThrowNew(jenv, excClass,
29322936
"wolfSSL not compiled with PK Callbacks and/or ECC");
29332937
return;
@@ -2943,8 +2947,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccSharedSecretCtx
29432947

29442948
void* eccSharedSecretCtx;
29452949
internCtx* myCtx;
2946-
#endif
29472950
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
2951+
#endif
29482952

29492953
/* find exception class in case we need it */
29502954
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -3005,6 +3009,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setEccSharedSecretCtx
30053009

30063010
wolfSSL_SetEccSharedSecretCtx(ssl, myCtx);
30073011
#else
3012+
(void)jcl;
3013+
(void)sslPtr;
30083014
(*jenv)->ThrowNew(jenv, excClass,
30093015
"wolfSSL not compiled with PK Callbacks and/or ECC");
30103016
return;
@@ -3020,8 +3026,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaSignCtx
30203026

30213027
void* rsaSignCtx;
30223028
internCtx* myCtx;
3023-
#endif
30243029
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
3030+
#endif
30253031

30263032
/* find exception class in case we need it */
30273033
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -3082,6 +3088,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaSignCtx
30823088

30833089
wolfSSL_SetRsaSignCtx(ssl, myCtx);
30843090
#else
3091+
(void)jcl;
3092+
(void)sslPtr;
30853093
(*jenv)->ThrowNew(jenv, excClass,
30863094
"wolfSSL not compiled with PK Callbacks and/or RSA support");
30873095
return;
@@ -3097,8 +3105,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaVerifyCtx
30973105

30983106
void* rsaVerifyCtx;
30993107
internCtx* myCtx;
3100-
#endif
31013108
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
3109+
#endif
31023110

31033111
/* find exception class in case we need it */
31043112
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -3159,6 +3167,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaVerifyCtx
31593167

31603168
wolfSSL_SetRsaVerifyCtx(ssl, myCtx);
31613169
#else
3170+
(void)jcl;
3171+
(void)sslPtr;
31623172
(*jenv)->ThrowNew(jenv, excClass,
31633173
"wolfSSL not compiled with PK Callbacks and/or RSA support");
31643174
return;
@@ -3174,8 +3184,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaEncCtx
31743184

31753185
void* rsaEncCtx;
31763186
internCtx* myCtx;
3177-
#endif
31783187
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
3188+
#endif
31793189

31803190
/* find exception class in case we need it */
31813191
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -3237,6 +3247,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaEncCtx
32373247

32383248
wolfSSL_SetRsaEncCtx(ssl, myCtx);
32393249
#else
3250+
(void)jcl;
3251+
(void)sslPtr;
32403252
(*jenv)->ThrowNew(jenv, excClass,
32413253
"wolfSSL not compiled with PK Callbacks and/or RSA support");
32423254
return;
@@ -3252,8 +3264,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaDecCtx
32523264

32533265
void* rsaDecCtx;
32543266
internCtx* myCtx;
3255-
#endif
32563267
WOLFSSL* ssl = (WOLFSSL*)(uintptr_t)sslPtr;
3268+
#endif
32573269

32583270
/* find exception class in case we need it */
32593271
excClass = (*jenv)->FindClass(jenv, "com/wolfssl/WolfSSLException");
@@ -3314,6 +3326,8 @@ JNIEXPORT void JNICALL Java_com_wolfssl_WolfSSLSession_setRsaDecCtx
33143326

33153327
wolfSSL_SetRsaDecCtx(ssl, myCtx);
33163328
#else
3329+
(void)jcl;
3330+
(void)sslPtr;
33173331
(*jenv)->ThrowNew(jenv, excClass,
33183332
"wolfSSL not compiled with PK Callbacks and/or RSA support");
33193333
return;

0 commit comments

Comments
 (0)