Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Randolph Lin <randolph@andestech.com>
Cc: Mina Hui-Min Chou <minachou@andestech.com>,
	alankao@andestech.com, kester.tw@gmail.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls: Fix tst_res() format string for 64-bit offset
Date: Mon, 12 Sep 2022 11:52:46 +0200	[thread overview]
Message-ID: <Yx8Bbu2Zaosb6y7f@yuki> (raw)
In-Reply-To: <20220907053841.7923-1-randolph@andestech.com>

Hi!
> When compiling as 32-bit with _FILE_OFFSET_BITS=64, the format string
> needs to be specified as 64-bit long (%lld).
> Fix format string for type block_size.

This change introduces warnings on 64bit platform instead.
Unfortunatelly unlike the size_t and ssize_t which can be printed with
%zu and %zi there is no such thing for off_t. So the only way how to
actually print off_t correctly is to cast it to (long long int) in
addintion to changing the format string to %lli or %lld.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-09-12  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  5:38 [LTP] [PATCH] syscalls: Fix tst_res() format string for 64-bit offset Randolph Lin
2022-09-12  9:52 ` Cyril Hrubis [this message]
2022-09-13  7:46   ` Randolph Sheng-Kai Lin(林聖凱)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yx8Bbu2Zaosb6y7f@yuki \
    --to=chrubis@suse.cz \
    --cc=alankao@andestech.com \
    --cc=kester.tw@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=minachou@andestech.com \
    --cc=randolph@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox