Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13218

warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.2.6
    • 10.2.7
    • Compiling
    • Debian 8.8 x32 - Digitalocean

       # uname -a
      Linux framework 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) i686 GNU/Linux

    Description

      [ 43%] Building C object libmariadb/unittest/libmariadb/CMakeFiles/ps.dir/ps.c.o
      /var/tmp/mariadb_build/mariadb_src/libmariadb/unittest/libmariadb/ps.c: In function ‘test_long_data_str1’:
      /var/tmp/mariadb_build/mariadb_src/libmariadb/unittest/libmariadb/ps.c:1500:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat=]
      diag("max_length: %lu max_blob_length: %lu", field->max_length, max_blob_length);
      ^

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            The rest of the server code uses %z for size_t

            danblack Daniel Black added a comment - The rest of the server code uses %z for size_t

            Would it be correct to change it to %zu ?

            dertin Guillermo Céspedes Tabárez added a comment - Would it be correct to change it to %zu ?
            elenst Elena Stepanova added a comment - Can be seen in buildbot http://buildbot.askmonty.org/buildbot/builders/kvm-deb-jessie-x86/builds/2482/steps/compile/logs/warnings%20%2856%29

            People

              georg Georg Richter
              dertin Guillermo Céspedes Tabárez
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.