@@ -105,7 +105,7 @@ JNIEXPORT jlong JNICALL Java_tel_schich_javacan_SocketCAN_getReadTimeout(JNIEnv
105105 if (result ) {
106106 throw_native_exception (env , "Unable to get read timeout" );
107107 }
108- return timeout ;
108+ return ( jlong ) timeout ;
109109}
110110
111111JNIEXPORT jint JNICALL Java_tel_schich_javacan_SocketCAN_setWriteTimeout (JNIEnv * env , jclass class , jint sock , jlong seconds , jlong nanos ) {
@@ -122,7 +122,7 @@ JNIEXPORT jlong JNICALL Java_tel_schich_javacan_SocketCAN_getWriteTimeout(JNIEnv
122122 if (result ) {
123123 throw_native_exception (env , "Unable to get write timeout" );
124124 }
125- return timeout ;
125+ return ( jlong ) timeout ;
126126}
127127
128128JNIEXPORT jint JNICALL Java_tel_schich_javacan_SocketCAN_setReceiveBufferSize (JNIEnv * env , jclass class , jint sock , jint size ) {
@@ -319,7 +319,15 @@ JNIEXPORT jobject JNICALL Java_tel_schich_javacan_SocketCAN_getIsotpOpts(JNIEnv
319319 return NULL ;
320320 }
321321
322- return create_tel_schich_javacan_IsotpOptions (env , opts .flags , opts .frame_txtime , opts .ext_address , opts .txpad_content , opts .rxpad_content , opts .rx_ext_address );
322+ return create_tel_schich_javacan_IsotpOptions (
323+ env ,
324+ (jint )opts .flags ,
325+ (jint )opts .frame_txtime ,
326+ (jbyte )opts .ext_address ,
327+ (jbyte )opts .txpad_content ,
328+ (jbyte )opts .rxpad_content ,
329+ (jbyte )opts .rx_ext_address
330+ );
323331}
324332
325333JNIEXPORT jint JNICALL Java_tel_schich_javacan_SocketCAN_setIsotpRecvFc (JNIEnv * env , jclass class , jint sock , jbyte bs , jbyte stmin , jbyte wftmax ) {
@@ -343,7 +351,12 @@ JNIEXPORT jobject JNICALL Java_tel_schich_javacan_SocketCAN_getIsotpRecvFc(JNIEn
343351 return NULL ;
344352 }
345353
346- return create_tel_schich_javacan_IsotpFlowControlOptions (env , opts .bs , opts .stmin , opts .wftmax );
354+ return create_tel_schich_javacan_IsotpFlowControlOptions (
355+ env ,
356+ (jbyte )opts .bs ,
357+ (jbyte )opts .stmin ,
358+ (jbyte )opts .wftmax
359+ );
347360}
348361
349362
@@ -406,5 +419,10 @@ JNIEXPORT jobject JNICALL Java_tel_schich_javacan_SocketCAN_getIsotpLlOpts(JNIEn
406419 return NULL ;
407420 }
408421
409- return create_tel_schich_javacan_IsotpLinkLayerOptions (env , opts .mtu , opts .tx_dl , opts .tx_flags );
422+ return create_tel_schich_javacan_IsotpLinkLayerOptions (
423+ env ,
424+ (jbyte )opts .mtu ,
425+ (jbyte )opts .tx_dl ,
426+ (jbyte )opts .tx_flags
427+ );
410428}
0 commit comments