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 1/1] sparse-ltp: Fix bogus warning
Date: Tue, 4 Jun 2024 13:44:21 +0200	[thread overview]
Message-ID: <Zl7-FehzfYbRxhcy@yuki> (raw)
In-Reply-To: <20240528121715.436013-1-pvorel@suse.cz>

Hi!
> tst_tmpdir.c:347:6: warning: Symbol 'tst_purge_dir' has no prototype or
> library ('tst_') prefix. Should it be static?

Actually this is a correct check. The idea is a bit different, we are
trying to make sure that there is a prototype in the headers for the
function. If that is true, the sym->same_symbol points to that symbol
instance and the check exists before it reaches that warning.

So the actuall problem here is that the prototype is in a strange place,
i.e. tst_device.h which is not included into tst_tmpdir.c.

Obvious fix would be including tst_device.h into tst_tmpdir.c however
I'm not sure that the function to purge the directory belongs to the
tst_device.h to begin with. Maybe we should add just tst_tmpdir.h with
that function and include it into right places, i.e. tst_test.h and
tst_tmpdir.c.

-- 
Cyril Hrubis
chrubis@suse.cz

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

      reply	other threads:[~2024-06-04 11:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 12:17 [LTP] [PATCH 1/1] sparse-ltp: Fix bogus warning Petr Vorel
2024-06-04 11:44 ` Cyril Hrubis [this message]

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=Zl7-FehzfYbRxhcy@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