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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Platform/s:
      macOS
    • Commits:
      939f5112a1033299ec1a178fbd4232717a98e735 (qt/qtbase/dev)

      Description

      
      /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?

        Attachments

        For Gerrit Dashboard: QTBUG-85344
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes