Skip to content

Commit

Permalink
bugfix: codecc check
Browse files Browse the repository at this point in the history
  • Loading branch information
felixzhou committed Jan 8, 2019
1 parent d6e7ed2 commit 6f5ad08
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ static int compileAbiToElfMachine() {
return EM_MIPS;
#elif defined(__x86_64__)
return EM_X86_64;
#else //TODO add more abi here
return EM_NONE
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace iocanary {
}

IOCanary::IOCanary() {
exit_ = false;
std::thread detect_thread(&IOCanary::Detect, this);
detect_thread.detach();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace iocanary {
}

JNIEnv* env;
bool attached;
bool attached = false;
jint j_ret = kJvm->GetEnv((void**)&env, JNI_VERSION_1_6);
if (j_ret == JNI_EDETACHED) {
jint jAttachRet = kJvm->AttachCurrentThread(&env, nullptr);
Expand Down Expand Up @@ -278,12 +278,12 @@ namespace iocanary {

JNIEXPORT void JNICALL
Java_com_tencent_matrix_iocanary_core_IOCanaryJniBridge_enableDetector(JNIEnv *env, jclass type, jint detector_type) {
iocanary::IOCanary::Get().RegisterDetector(DetectorType(detector_type));
iocanary::IOCanary::Get().RegisterDetector(static_cast<DetectorType>(detector_type));
}

JNIEXPORT void JNICALL
Java_com_tencent_matrix_iocanary_core_IOCanaryJniBridge_setConfig(JNIEnv *env, jclass type, jint key, jlong val) {
iocanary::IOCanary::Get().SetConfig(IOCanaryConfigKey(key), val);
iocanary::IOCanary::Get().SetConfig(static_cast<IOCanaryConfigKey>(key), val);
}

JNIEXPORT jboolean JNICALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public boolean equals(Object o) {
}

SQLiteLintIssue d = (SQLiteLintIssue) o;
return d.id.equals(((SQLiteLintIssue) o).id);
return d.id.equals(id);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,16 @@ private void makeKey(TreeNode node, AnalyseExtraInfo analyseExtraInfo) {
private void getKey(TreeNode root, StringBuilder builder) {
if (mAnalyseStackList.isEmpty()) {
Iterator<TreeNode> iterator = root.mChildNodes.iterator();
int count = 0;
while (iterator.hasNext()) {
if (count > Constants.MAX_LIMIT_ANALYSE_STACK_KEY_NUM) {
break;
}
mAnalyseStackList.add(iterator.next().mItem);
count++;
}
}

if (mAnalyseStackList.size() > Constants.MAX_LIMIT_ANALYSE_STACK_KEY_NUM) {
mAnalyseStackList.subList(0, Constants.MAX_LIMIT_ANALYSE_STACK_KEY_NUM);
}

for (MethodItem methodItem : mAnalyseStackList) {
builder.append(methodItem.methodId);
builder.append('\n');
Expand Down

0 comments on commit 6f5ad08

Please sign in to comment.