Skip to content

Commit

Permalink
mobile: Fix compiler warnings. (envoyproxy#29718)
Browse files Browse the repository at this point in the history
This fixes the following compiler warnings:
- `-Wsign-compare`
- `-Wreturn-type`

Signed-off-by: Fredy Wijaya <fredyw@google.com>
  • Loading branch information
fredyw authored Sep 19, 2023
1 parent 5cf7598 commit b0b62e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mobile/library/common/jni/android_network_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ envoy_cert_validation_result verify_x509_cert_chain(const std::vector<std::strin
case CERT_VERIFY_STATUS_NOT_YET_VALID:
return {ENVOY_FAILURE, SSL_AD_CERTIFICATE_UNKNOWN,
"AndroidNetworkLibrary_verifyServerCertificates failed: not yet valid."};
default:
PANIC_DUE_TO_CORRUPT_ENUM
}
}

Expand Down
2 changes: 1 addition & 1 deletion mobile/library/common/jni/jni_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ std::vector<MatcherData> javaObjectArrayToMatcherData(JNIEnv* env, jobjectArray

JavaArrayOfByteToString(env, static_cast<jbyteArray>(env->GetObjectArrayElement(array, 0)),
&cluster_name_out);
for (int i = 1; i < len; i += 3) {
for (size_t i = 1; i < len; i += 3) {
std::string name;
std::string type_as_string;
std::string value;
Expand Down

0 comments on commit b0b62e0

Please sign in to comment.