lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANg8OW+rBXgVaboip0JCmmTb_1Gzt6R3kUju2Y8iYvj6=pnzYQ@mail.gmail.com>
Date:	Mon, 3 Sep 2012 22:59:23 +0300
From:	Irina Tirdea <irina.tirdea@...il.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 08/13] perf tools: Use __maybe_used for unused variables

On Mon, Sep 3, 2012 at 4:07 AM, Namhyung Kim <namhyung@...nel.org> wrote:
> Hi,

Hi,

>
> On Wed, 29 Aug 2012 01:04:25 +0300, Irina Tirdea wrote:
>> perf defines __used to for marking unused variables.
>> The variable __used is defined to __attribute__((__unused__)), which
>> contradicts the kernel definition to __attribute__((__used__))
>> for new gcc versions. On Android), __used is also defined in
>> system headers and this leads to warnings like:
>> warning: '__used__' attribute ignored
>>
>> This patch simply replaces all instances of __used with __maybe_unused
>> so there will be no such warnings.
>
> How about just using '__unused' for less typing?

Replacing __used with __unused leads to conflicts with glibc headers,
since glibc has a variable named __unused in the stat.h header. I
forgot to mention this in the commit message.

This is the error:
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:107:0,
                 from util/util.h:48,
                 from builtin-bench.c:20:
/usr/include/x86_64-linux-gnu/bits/stat.h:106:22: error: expected
identifier or ‘(’ before ‘[’ token
/usr/include/x86_64-linux-gnu/bits/stat.h:167:22: error: expected
identifier or ‘(’ before ‘[’ token
make: *** [builtin-bench.o] Error 1

> Btw, the patch looks whitespace-damaged.

That's true. I'll fix it.

Thanks,
Irina
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ