Skip to content

qxcbwindow.cpp: Fix sign-compare and another warnings

qsizetype(int32 on 32bit, int64 on 64bit) vs uint32.

qxcbwindow.cpp: In member function 'virtual void QXcbWindow::setWindowIcon(const QIcon&)': qxcbwindow.cpp:1300:30: warning: comparison of integer expressions of different signedness: 'qsizetype' {aka 'int'} and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare] 1300 | if (icon_data.size() > xcb_get_maximum_request_length(xcb_connection())) { | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qxcbwindow.cpp:1301:53: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'qsizetype' {aka 'int'} [-Wformat=] 1301 | qWarning("Ignoring window icon: Size %llu exceeds maximum xcb request length %u.", | ~~~^ | | | long long unsigned int | %u 1302 | icon_data.size(), xcb_get_maximum_request_length(xcb_connection())); | ~~~~~~~~~~~~~~~~ | | | qsizetype {aka int}

This amends ebdaf8ef.

Fixes: QTBUG-109610 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I2c9b5ad27881658463dd0870639c42d3ea8e7aba Reviewed-by: Axel Spoerl (cherry picked from commit ec787ce1)

Merge request reports