Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9803

Need to cast st_blksize to unsigned long for printf in directio.c

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Had a compilation fail due:

      directio.c: In function 'main':
      directio.c:114:16: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type '__blksize_t' [-Werror=format=]
                      st.st_blksize);
                      ^
      
      
      

      This is the code

              printf("directio on %s for %dx%lu bytes \n", fname, blocks,
                     st.st_blksize);
      
      
      

      Think we can get by with just casting that st_blksize to an unsigned long. I'll push a patch

      Attachments

        Activity

          [LU-9803] Need to cast st_blksize to unsigned long for printf in directio.c
          mdiep Minh Diep added a comment -

          Landed in 2.11

          mdiep Minh Diep added a comment - Landed in 2.11

          Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28262/
          Subject: LU-9803 tests: cast st_blksize for printf
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 8784406f98dd4ddd98cec9cd728b70b22de3d1bf

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28262/ Subject: LU-9803 tests: cast st_blksize for printf Project: fs/lustre-release Branch: master Current Patch Set: Commit: 8784406f98dd4ddd98cec9cd728b70b22de3d1bf

          Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/28262
          Subject: LU-9803 tests: cast st_blksize for printf
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: fbfd5c8f2c242b5befc40d88b29b7dbf4700e395

          gerrit Gerrit Updater added a comment - Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/28262 Subject: LU-9803 tests: cast st_blksize for printf Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: fbfd5c8f2c242b5befc40d88b29b7dbf4700e395

          People

            hornc Chris Horn
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: