Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85344

warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'qsizetype' (aka 'long long') [-Wformat]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.0.0
    • Core: Other
    • None
    • macOS
    • 939f5112a1033299ec1a178fbd4232717a98e735 (qt/qtbase/dev)

      
      /Users/torarne/dev/qt/6.0/qtbase/src/tools/androiddeployqt/main.cpp:1145:73: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'qsizetype' (aka 'long long') [-Wformat]
              fprintf(stdout, "Copying %zd external libraries to package.\n", qsizetype(options->extraLibs.size()));
                                       ~~~                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                       %lld
      /Users/torarne/dev/qt/6.0/qtbase/src/tools/androiddeployqt/main.cpp:2098:81: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'qsizetype' (aka 'long long') [-Wformat]
                  fprintf(stdout, "Copying %zd dependencies from Qt into package.\n", options->qtDependencies.size());
                                           ~~~                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           %lld
      /Users/torarne/dev/qt/6.0/qtbase/src/tools/androiddeployqt/main.cpp:2101:79: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'qsizetype' (aka 'long long') [-Wformat]
                  fprintf(stdout, "Setting %zd dependencies from Qt in package.\n", options->qtDependencies.size());
                                           ~~~                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                           %lld
      3 warnings generated.
      

      Docs say:

      This is a type alias for QIntegerForSizeof<std::size_t>::Signed.

      Integral type providing Posix' ssize_t for all platforms.

      This type is guaranteed to be the same size as a size_t on all platforms supported by Qt.

      So the docs are wrong? Guaranteed to be same size or larger? Or something fishy in qsizetype?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes