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

changelogs: Fix count variable type #683

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

pkratoch
Copy link
Contributor

The variable count in print_changelogs used to be int32_t, but was changed to int64_t. Because of that, the build on i686 arch fails with:

error: conversion from 'int64_t' {aka 'long long int'} to
'__gnu_cxx::__normal_iterator<libdnf5::rpm::Changelog*,
std::vector<libdnf5::rpm::Changelog> >::difference_type' {aka 'int'} may
change value [-Werror=conversion]

The issue blocks build on Fedora rawhide: https://koji.fedoraproject.org/koji/taskinfo?taskID=102735120

The variable `count` in `print_changelogs` used to be `int32_t`, but was
changed to `int64_t`. Because of that, the build on i686 arch fails with:

```
error: conversion from 'int64_t' {aka 'long long int'} to
'__gnu_cxx::__normal_iterator<libdnf5::rpm::Changelog*,
std::vector<libdnf5::rpm::Changelog> >::difference_type' {aka 'int'} may
change value [-Werror=conversion]
```
@jan-kolarik
Copy link
Member

It looks it should work, also on i686. We are currently running CI only against x86_64 unfortunately. This could be probably improved.

Also one other thing. The libdnf5-cli are public headers. I am not sure if the changelogs.hpp header will be in the future also wrapped using SWIG. In that case we would need to get rid of the std::variant from the interface and I think it would be even better for readability, because it seems the logic there could be easily refactored to several overloads...

Copy link
Member

@jan-kolarik jan-kolarik left a comment

Choose a reason for hiding this comment

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

LGTM, created follow-up ticket for mentioned SWIG issue.

@kontura kontura added this pull request to the merge queue Jun 29, 2023
Merged via the queue into rpm-software-management:main with commit 49cd99c Jun 29, 2023
@pkratoch pkratoch deleted the changelogs-count branch November 9, 2023 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants