Revert "Revert "Fix one and hide the other warnings from core/jni""

This reverts commit eebe6dd9afe105f5e6b8dfd246036bf023ad1629.