Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fix clang12 warnings #7593

Merged
merged 1 commit into from
Mar 9, 2021
Merged

Conversation

tkonolige
Copy link
Contributor

These fixes include

  • Using 0 or NULL instead of nullptr
  • Marking overridden virtual functions with override
  • Adding error handling and a missing else statement to a string check

@junrushao1994 @jroesch @areusch @rohanmukh

@@ -98,7 +98,7 @@ class JSONRuntimeBase : public ModuleNode {
}
}

virtual void SaveToBinary(dmlc::Stream* stream) {
void SaveToBinary(dmlc::Stream* stream) override {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be final

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with TQ’s comments

@@ -55,7 +55,7 @@ class JSONRuntimeBase : public ModuleNode {
LoadGraph(graph_json_);
}

const char* type_key() const { return "json"; }
const char* type_key() const override { return "json"; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also be final as well, do it to other places that overrides

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, arm compute lib inherits from this class. I'm leaving everything as override.

@tqchen tqchen added the status: need update need update based on feedbacks label Mar 8, 2021
@junrushao junrushao merged commit a8d1055 into apache:main Mar 9, 2021
@junrushao junrushao added status: accepted and removed status: need update need update based on feedbacks labels Mar 9, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants