Re: [PATCH] ci: update 'static-analysis' to Ubuntu 22.04

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> What's happening here is that coccinelle can no longer properly parse
> the file after the UNUSED() macros were applied to refs.c.

Sigh.

> 	diff --git a/refs.c b/refs.c
> 	index 607694c2662..37e7d88920c 100644
> 	--- a/refs.c
> 	+++ b/refs.c
> 	@@ -442,7 +442,7 @@ struct warn_if_dangling_data {
> 	 };
> 	 
> 	 static int warn_if_dangling_symref(const char *refname,
> 	-				   const struct object_id *UNUSED(oid),
> 	+				   const struct object_id *oid UNUSED2,
> 	 				   int flags, void *cb_data)
> 	 {
> 	 	struct warn_if_dangling_data *d = cb_data;

This is almost "the most simple and stupid and nobody would get
confused" version, which I may actually be able to live with.

Unfortunately it will not get the "somebody by mistake uses 'oid'
and we can break the build no matter what compiler is used by them
before sending the patch out to the list".

Doing s/oid UNUSED2/oid_UNUSED/ without any __attribute__((unused))
would give that benefit to us, but that won't squelch compilation
with -Wunused which makes it a non-starter.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux