-
Notifications
You must be signed in to change notification settings - Fork 73
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
[3.2] reenable warnings for softfloat and wasm-jit, and fix a warning in wasm-jit #263
Conversation
@@ -514,7 +514,7 @@ namespace NFA | |||
std::set<StateIndex> terminalStates; | |||
|
|||
CharSet* classCharSets = (CharSet*)alloca(sizeof(CharSet) * numClasses); | |||
memset(classCharSets,0,sizeof(CharSet) * numClasses); | |||
memset((char*)classCharSets,0,sizeof(CharSet) * numClasses); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this just mask the warning? It's still memseting a non trivial type.
A CharSet
is a DenseStaticIntSet<U8,256>
and DenseStaticIntSet
actually does do a memset on its contents. Since this isn't performance sensitive I wonder if just replacing this with a std::vector or such makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dumpDFAGraphViz()
is never called unless -D_DEBUG
is passed, which it is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call. just zap it all then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean _DEBUG
flag would never be used and I can go ahead removing all #ifdef _DEBUG
and the functions which were only used inside #ifdef _DEBUG
block like dumpDFAGraphViz
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, _DEBUG
will never be set, so might as well just remove this code since it's not too invasive of change.
dumpNFAGraphViz and dumpDFAGraphViz are only used in _DEBUG mode. But _DEBUG will never be used. Remove them for simpler code and one fewer warning
…om/AntelopeIO/leap into reenable_warning_softfloat_wasmjit
#else | ||
false, | ||
#endif | ||
false, // debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasm-jit has a different indentation style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed. It was caused by a tab (wasm-jit uses tabs for indentation).
Resolve #256
Warnings were disabled for
softfloat
andwasm-jit
. From #256:After warnings were re-enabled, only following warnings were reported. They were not serious. Warning in
wasm-jit
is fixed in this PR. Warnings in softfloat will be fixed in a separate PR (as it is a submodule).