Fix couple compiler warnings.

This commit is contained in:
Nikolay Igotti
2016-12-02 16:06:04 +03:00
parent 83dcb0fc3a
commit 3cee19d28e
3 changed files with 5 additions and 5 deletions
@@ -313,8 +313,8 @@ fun buildNativeIndexImpl(headerFile: File, args: List<String>): NativeIndex {
importedASTFile.value = null importedASTFile.value = null
startedTranslationUnit.value = null startedTranslationUnit.value = null
indexDeclaration.value = staticCFunction { clientData, info -> indexDeclaration.value = staticCFunction { clientData, info ->
val index = StableObjPtr.fromValue(clientData!!).get() as NativeIndexImpl val nativeIndex = StableObjPtr.fromValue(clientData!!).get() as NativeIndexImpl
index.indexDeclaration(info!!.pointed) nativeIndex.indexDeclaration(info!!.pointed)
} }
indexEntityReference.value = null indexEntityReference.value = null
} }
@@ -87,8 +87,8 @@ private fun Properties.getSpaceSeparated(name: String): List<String> {
} }
private fun List<String>?.isTrue(): Boolean { private fun List<String>?.isTrue(): Boolean {
// The rightmost wins // The rightmost wins, null != "true".
return this?.last() == "true" ?: false return this?.last() == "true"
} }
private fun processLib(ktGenRoot: String, private fun processLib(ktGenRoot: String,
+1 -1
View File
@@ -51,7 +51,7 @@ KString Kotlin_Int_toString(KInt value) {
KString Kotlin_Long_toString(KLong value) { KString Kotlin_Long_toString(KLong value) {
char cstring[32]; char cstring[32];
snprintf(cstring, sizeof(cstring), "%lld", value); snprintf(cstring, sizeof(cstring), "%lld", static_cast<long long>(value));
return makeString(cstring); return makeString(cstring);
} }