Skip to content

More generic crash report for unsupported archs#9385

Merged
oranagra merged 3 commits intoredis:unstablefrom
yoav-steinberg:build_warnings_on_s390x
Aug 18, 2021
Merged

More generic crash report for unsupported archs#9385
oranagra merged 3 commits intoredis:unstablefrom
yoav-steinberg:build_warnings_on_s390x

Conversation

@yoav-steinberg
Copy link
Contributor

Specifically handles build warnings on s390x

Comment on lines +1027 to +1030
#define NOT_SUPPORTED() do {\
UNUSED(uc);\
return NULL;\
} while(0)
Copy link
Member

Choose a reason for hiding this comment

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

why not just always do UNUSED(uc), and have a single return NULL at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I add a return NULL; at the end then when the arch is known it'll compile to two returns:

return (void*)uc->stuff;
return NULL;

Which will generate more warnings.

Copy link
Member

Choose a reason for hiding this comment

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

ohh.. unreachable code...
well, ok. let's keep your version..

Comment on lines +1115 to +1119
#define NOT_SUPPORTED() do {\
UNUSED(uc);\
serverLog(LL_WARNING,\
" Dumping of registers not supported for this OS/arch");\
} while(0)
Copy link
Member

Choose a reason for hiding this comment

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

same here, i'd be ok with just adding UNUSED(uc).
the the very fact the register dump is missing seems enough (the log print is unnecessary).

Copy link
Contributor Author

@yoav-steinberg yoav-steinberg Aug 18, 2021

Choose a reason for hiding this comment

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

Was trying to keep the previous behavior. If we scrap the logging then we can just add UNUSED(uc); since the there's no return value in this function. Should we scrap the logging?

@oranagra oranagra merged commit 0e8d469 into redis:unstable Aug 18, 2021
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Sep 8, 2021
Following compilation warnings on s390x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants