Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

qgrep: fix -Wcalloc-transposed-args warning #30

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

Conversation

emanuele6
Copy link
Contributor

I get this warning when compiling portage-utils with gcc (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817.

qgrep.c: In function ‘qgrep_main’:
qgrep.c:558:40: warning: ‘xcalloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  558 |                         xcalloc(sizeof(depend_atom *), (argc - optind - 1) + 1);
      |                                        ^~~~~~~~~~~
qgrep.c:558:40: note: earlier argument should specify number of elements, later size of each element

I get this warning when compiling portage-utils with
gcc (Gentoo 14.2.1_p20240817 p4) 14.2.1 20240817

Signed-off-by: Emanuele Torre <torreemanuele6@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant