Skip to content

Commit 93b4c0d

Browse files
committed
Fix CI-CD feedback.
1 parent 547e275 commit 93b4c0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/cpp/windows/jssc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ JNIEXPORT jint JNICALL Java_jssc_SerialNativeInterface_writeBytes
283283
delete overlapped;
284284
if( err ){
285285
char emsg[128];
286-
snprintf(emsg, sizeof emsg, "Error %d: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes#system-error-codes", err);
287-
jobject *exClz = env->FindClass("jssc/SerialPortException");
286+
snprintf(emsg, sizeof emsg, "Error %lu: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes#system-error-codes", err);
287+
jclass *exClz = env->FindClass("jssc/SerialPortException");
288288
if( exClz ) env->ThrowNew(exClz, emsg);
289289
}
290290
return returnValue;
@@ -321,7 +321,7 @@ JNIEXPORT jbyteArray JNICALL Java_jssc_SerialNativeInterface_readBytes
321321
lpBuffer = (jbyte*)malloc(byteCount*sizeof*lpBuffer);
322322
if( !lpBuffer ){
323323
char emsg[32]; emsg[0] = '\0';
324-
snprintf(emsg, sizeof emsg, "malloc(%d) failed", byteCount*sizeof*lpBuffer);
324+
snprintf(emsg, sizeof emsg, "malloc(%llu) failed", byteCount*sizeof*lpBuffer);
325325
jclass exClz = env->FindClass("java/lang/RuntimeException");
326326
if( exClz ) env->ThrowNew(exClz, emsg);
327327
returnArray = NULL; goto Finally;

0 commit comments

Comments
 (0)