-
Notifications
You must be signed in to change notification settings - Fork 185
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
Reduce number of warnings #179
base: master
Are you sure you want to change the base?
Conversation
@@ -45,7 +45,7 @@ class CTable | |||
|
|||
CTable() | |||
{ | |||
::memset(_rgtype, 0, sizeof(_rgtype)); | |||
::memset((void*)_rgtype, 0, sizeof(_rgtype)); |
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.
Wait, this isn't fixing anything, it's just suppressing the warning... and the warning looks correct to me.
Utilities/socketxx/socket++/fork.cpp
Outdated
{ | ||
ForkProcess* cur = Fork::ForkProcess::list; | ||
while(cur != nullptr){ | ||
ForkProcess* next = cur->next; | ||
if(cur->kill_child) | ||
delete cur; | ||
break; | ||
} | ||
|
||
cur = next; | ||
} | ||
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.
The commit message doesn't say what the change is about...
@@ -607,7 +607,7 @@ class Element<TVR, VM::VM1_n> | |||
Save = true; // ???? | |||
if( Internal ) | |||
{ | |||
memcpy(internal, Internal, len); | |||
memcpy((void*)internal, (void*)Internal, Length); |
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.
Same comment here. This is suppressing a warning, not fixing anything...
Utilities/socketxx/socket++/fork.cpp
Outdated
// First, kill all children whose kill_child flag is set. | ||
// Second, wait for other children to die. | ||
{ | ||
for (ForkProcess* cur = Fork::ForkProcess::list; cur; cur = cur->next) | ||
if (cur->kill_child) | ||
|
||
for (ForkProcess* cur = Fork::ForkProcess::list; cur != nullptr; cur = cur->next) | ||
if (cur->kill_child) { | ||
delete cur; | ||
break; | ||
} |
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.
The comment above this code says "kill all children" so breaking after killing one seems wrong...
@@ -58,7 +58,7 @@ unique_ptr<JpegMarkerSegment> JpegMarkerSegment::CreateJpegFileInterchangeFormat | |||
content.push_back(static_cast<uint8_t>(params.Ythumbnail)); | |||
if (params.Xthumbnail > 0) | |||
{ | |||
if (params.thumbnail) |
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.
This is 3rd party code, so needs separate handling.
Is this reversal of logic fixed upstream already perhaps?
Fix of: -Wclass-memaccess -Wuse-after-free -Werror=unused-but-set-variable -Werror=unused-variable -Werror=nonnull for GCC 12.
This PR is updated #177.