public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/msgstress01: Fix off by one in array access
Date: Thu, 23 May 2024 20:35:20 +0200	[thread overview]
Message-ID: <Zk-MaMDigdnbQOUk@yuki> (raw)
In-Reply-To: <20240523161944.GA29885@pevik>

Hi!
> And FYI (old, unimportant warning): musl 32bit complains about off_t being long
> long int. Not sure if we bother (after the release) to %lld + cast to (long long int).
> 
> ../../../../../include/tst_safe_macros.h:284:50: warning: format '%ld' expects argument of type 'long int', but argument 11 has type 'off_t' {aka 'long long int'} [-Wformat=]
>   284 |                 "mmap(%p, %zu, %s(%x), %d, %d, %ld)",
>       |                                                ~~^
>       |                                                  |
>       |                                                  long int
>       |                                                %lld

Well, we should print it as lld and cast the off the to (long long int)
to make the code correct on 32bit.

>   285 |                 addr, length, prot_buf, prot, flags, fd, offset);
>       |                                                          ~~~~~~
>       |                                                          |
>       |                                                          off_t {aka long long int}
> 
> Kind regards,
> Petr

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2024-05-23 18:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:59 [LTP] [PATCH] syscalls/msgstress01: Fix off by one in array access Cyril Hrubis
2024-05-23 16:08 ` Martin Doucha
2024-05-23 16:27   ` Petr Vorel
2024-05-24 11:33   ` Cyril Hrubis
2024-05-24 11:39     ` Petr Vorel
2024-05-24 11:43     ` Martin Doucha
2024-05-24 11:59       ` Cyril Hrubis
2024-05-24 12:01         ` Martin Doucha
2024-05-23 16:19 ` Petr Vorel
2024-05-23 18:35   ` Cyril Hrubis [this message]
2024-05-23 16:25 ` Petr Vorel

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=Zk-MaMDigdnbQOUk@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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