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
dev-db/cdb: fix some K&R decls and strict-prototypes #34204
base: master
Are you sure you want to change the base?
Conversation
Pull Request assignmentSubmitter: @sevz17 dev-db/cdb: @hattya Linked bugsNo bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment. If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
It compiles, but it's not complete |
Pull request CI reportReport generated at: 2023-12-10 00:17 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
-register unsigned int n; | ||
-register char *t; | ||
+int | ||
+byte_diff (register char *s, register unsigned int n, register char *t) |
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.
btw, when you see register
, just drop it, it doesn't do anything
@@ -1,4 +1,5 @@ | ||
-void main() | ||
+void | ||
+main (void) |
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.
main with non-int return type?
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.
Yeah, the whole file:
void
main (void)
{
unsigned long u;
u = 1;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u;
if (!u) _exit(0);
_exit(1);
}
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.
pretty sure it's invalid to have non-int main
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 _exit calls can be replaced by proper return
s, right?
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.
main actually has special semantics: https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c (no need for explicit return)
... but yes, we can do that change you suggest, and it's simpler if we do
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
Pull request CI reportReport generated at: 2023-12-11 19:42 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
No description provided.