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

Qt6 build warns about: format specifies type 'int' but the argument has type 'qsizetype' #47960

Closed
2 tasks
t0b3 opened this issue Mar 25, 2022 · 0 comments · Fixed by #47961
Closed
2 tasks
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@t0b3
Copy link
Contributor

t0b3 commented Mar 25, 2022

What is the bug or the crash?

as a developer
building Qt6 with GRASS8 warns about
src/providers/grass/qgis.r.in.cpp:161:101: error: format specifies type 'int' but the argument has type 'qsizetype' (aka 'long long')

G_fatal_error( "Wrong byte array size, expected %d bytes, got %d, row %d / %d", expectedSize, byteArray.size(), row, rows );

see https://cdash.orfeo-toolbox.org/viewBuildError.php?buildid=94783

Steps to reproduce the issue

compile WITH_QT6=ON and WITH_GRASS8=ON same as in #47887 - but set WERROR=false

Versions

3.24.1 and master

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

not asking for support, just an issue tracker for developers

@t0b3 t0b3 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Mar 25, 2022
t0b3 added a commit to t0b3/QGIS that referenced this issue Mar 25, 2022
since Qt6 QByteArray::size() return qsizetype (aka long long)
therefore cast to int provides compatibility

Fixes qgis#47960
@Pedro-Murteira Pedro-Murteira added the Build/Install Related to compiling or installing QGIS label Mar 25, 2022
t0b3 added a commit to t0b3/QGIS that referenced this issue Mar 25, 2022
Qt6 QByteArray::size() returns long long
Qt5 QByteArray::size() returns int
always cast to long long to ensure format %lld matches

Fixes qgis#47960
t0b3 added a commit to t0b3/QGIS that referenced this issue Mar 25, 2022
Qt6 QByteArray::size() returns long long
Qt5 QByteArray::size() returns int
always cast to long long to ensure format %lld matches

Fixes qgis#47960
qgis-bot pushed a commit that referenced this issue Mar 25, 2022
Qt6 QByteArray::size() returns long long
Qt5 QByteArray::size() returns int
always cast to long long to ensure format %lld matches

Fixes #47960
qgis-bot pushed a commit that referenced this issue Mar 25, 2022
Qt6 QByteArray::size() returns long long
Qt5 QByteArray::size() returns int
always cast to long long to ensure format %lld matches

Fixes #47960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants