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

dev-db/cdb: fix some K&R decls and strict-prototypes #34204

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sevz17
Copy link
Contributor

@sevz17 sevz17 commented Dec 10, 2023

No description provided.

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @sevz17
Areas affected: ebuilds
Packages affected: dev-db/cdb

dev-db/cdb: @hattya

Linked bugs

No 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 [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Dec 10, 2023
@sevz17
Copy link
Contributor Author

sevz17 commented Dec 10, 2023

It compiles, but it's not complete

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-12-10 00:17 UTC
Newest commit scanned: 18b6604
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/561ad47b0e/output.html

-register unsigned int n;
-register char *t;
+int
+byte_diff (register char *s, register unsigned int n, register char *t)
Copy link
Member

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)
Copy link
Member

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?

Copy link
Contributor Author

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);
}

Copy link
Member

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

Copy link
Contributor Author

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 returns, right?

Copy link
Member

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>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-12-11 19:42 UTC
Newest commit scanned: 619d324
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/421fdb5d3d/output.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits.
Projects
None yet
4 participants