Re: [PATCH] fsstress: improve error message on check_cwd() error

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Sep 23, 2021 at 01:37:04PM +0100, Filipe Manana wrote:
> On Wed, Sep 22, 2021 at 9:07 PM Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote:
> >
> > On Wed, Sep 22, 2021 at 11:15:08AM +0100, Filipe Manana wrote:
> > > > +       fprintf(stderr, "fsstress: check_cwd statbuf.st_ino (%ld) != top_ino (%ld)\n",
> > > > +               (long)statbuf.st_ino, (long)top_ino);
> > >
> > > ino_t is guaranteed to be an unsigned integer, and can be either 64 or
> > > 32 bits wide [1].
> > > Casting to unsigned 64 bits would be better imo.
> >
> > There are other similar mi-uses in the code, should I fix those to
> > then?
> 
> If you want to, as a separate patch.

> Since the code is using struct stat64, using %llu
> for the printfs without any casts should be fine [1].

You mean %lu because with %llu there is a warning.

  Luis



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux