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]
Date:   Sat, 20 Nov 2021 23:24:32 +0300
From:   Maxim Petrov <mmrmaximuzz@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] Add missing headers to the project

Hello Stephen!

On 11/20/21 8:26 PM, Stephen Hemminger wrote:
> Would be better to do this with an existing tool like IncludeWhatYouUse
> Is this what you did?

This is my fault, I didn't even think about searching for any existing tools for
this task. :)

I just wrote a stupid loop over the header files like this:

```bash
for hdr in $(find . -name *.h)
do
	printf '#include "%s"' $hdr > headertest.c
	gcc headertest.c -c -I ./include -I ./include/uapi
done
```

and then manually patched the files until there are no compilation errors.

It seems like I reinvented the wheel and did it not so good. I targeted only
header files and fixed only compilation errors, possibly keeping some transitive
includes. IWYU looks much better as it targets usage, not just compilation
errors. If you can run this tool and fix the whole project automagically, then
it is better to ignore my patch. Anyway, thank you for the information, I will
definitely try IWYU soon.

Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ