Re: FTB due to 'too many arguments to function'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025/01/19 18:32, Michael J Gruber wrote:

Mattia Verga venit, vidit, dixit 2025-01-19 18:28:04:
For example:

https://kojipkgs.fedoraproject.org//work/tasks/7044/127997044/build.log

I don't know much of C, from what I've read online those functions are 
declared without arguments and then used with arguments. It seems this 
is now throwing an error, while before the mass rebuild just worked:

/builddir/build/BUILD/libahp-gt-1.7.0-build/libahp-gt-1.7.0/ahp_gt.c: In 
function ‘synscan_poll’:
/builddir/build/BUILD/libahp-gt-1.7.0-build/libahp-gt-1.7.0/ahp_gt.c:541:17: 
error: too many arguments to function ‘ahp_gt_get_tracking_mode’; 
expected 0, have 1
   541 |                 ahp_gt_get_tracking_mode(cmd[0]);
       |                 ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
In file included from 
/builddir/build/BUILD/libahp-gt-1.7.0-build/libahp-gt-1.7.0/ahp_gt.c:26:
/builddir/build/BUILD/libahp-gt-1.7.0-build/libahp-gt-1.7.0/redhat-linux-build/ahp_gt.h:1037:16: 
note: declared here
  1037 | DLL_EXPORT int ahp_gt_get_tracking_mode();
       |                ^~~~~~~~~~~~~~~~~~~~~~~~

Yes, this is clearly fallout from gcc 15 landing in rawhide (just before
the mass rebuild). It's not a gcc 15 bug, though.

You could file upstream for gcc 15 / C23 standard compatibility.

Either they had a typo or they wanted to abuse C interface (most likely the first one (off by 1 letter get->set)). This seems to be fixed upstream [1] anyway.

Maybe share the other example as well in case it is more clear that they really wanted to abuse C interface. This reads too much like a bug because in the supposedly "working" interface, they are passing an `int` that is being copied instead of a pointer and they are getting that as a return value.

[1]: https://github.com/ahp-electronics/libahp-gt/commit/324c0914e5dd3b23b5af5e871ba5dc0f790bddce

-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux