Skip to content

Commit

Permalink
add casts to fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
YSaxon committed Jun 14, 2024
1 parent 514b9a2 commit a22fd10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Empty file added FalsoJNI/FalsoJNI.c
Empty file.
4 changes: 2 additions & 2 deletions fakejni/FalsoJNI.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ jstring NewString(JNIEnv* env, const jchar* chars, jsize char_count) {
UTF16 * sourceEnd = &(((UTF16*)chars)[char_count]);
UTF8 * targetStart = &dst[0];
UTF8 * targetEnd = &dst[char_count];
ConversionResult res = ConvertUTF16toUTF8(&sourceStart, sourceEnd,
ConversionResult res = ConvertUTF16toUTF8((const UTF16**)&sourceStart, sourceEnd,
&targetStart, targetEnd, 1);
if (res != conversionOK) {
fjni_logv_err("Fatal: utf16 => utf8 conversion failed (%i)", res);
Expand Down Expand Up @@ -1223,7 +1223,7 @@ const jchar * GetStringChars(JNIEnv* env, jstring string, jboolean *isCopy) {
UTF8 * sourceEnd = &(((UTF8*)string)[size]);
UTF16 * targetStart = &dst[0];
UTF16 * targetEnd = &dst[size];
ConversionResult res = ConvertUTF8toUTF16(&sourceStart, sourceEnd,
ConversionResult res = ConvertUTF8toUTF16((const UTF8 **)&sourceStart, sourceEnd,
&targetStart, targetEnd, 1);
if (res != conversionOK) {
fjni_logv_err("Fatal: utf8 => utf16 conversion failed (%i)", res);
Expand Down

0 comments on commit a22fd10

Please sign in to comment.