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

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

    XMLWordPrintable

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

          People

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

            Dates

              Created:
              Updated:
              Resolved: