[minicoredumper] Building minicoredumper_demo/main.c fails
Anders Wallin
wallinux at gmail.com
Wed May 10 08:13:37 CEST 2017
Hi John,
I like to get the issue solved w/o turning on --compile-werror,
but if you want to keep the code as is it would be great if you apply your
patch
/Anders
tis 9 maj 2017 kl 09:32 skrev John Ogness <john.ogness at linutronix.de>:
> On 2017-04-24, Anders Wallin <wallinux at gmail.com> wrote:
> > If configure is run with "--with-minicoredumper_demo" the build will
> > fail due to missing typecasts.
>
> Actually, these errors were intentional. The demo is not particularly
> interesting as a runtime example. It is more interesting for developers
> as an API example. Part of that example was to demonstrate that each
> pointer argument is typecasted based on the length modifier and
> conversion specifier associated with that argument.
>
> Whenever I want to compile the demo program
> (--with-minicoredumper_demo), I also add --without-werror. I _want_ to
> see those warnings as it is proof for me that the automatic type
> checking is working.
>
> Perhaps I should modify main.c like this? Any thoughts?
>
> John Ogness
>
>
> --- a/src/minicoredumper_demo/main.c
> +++ b/src/minicoredumper_demo/main.c
> @@ -62,6 +62,10 @@ int __attribute__((optimize("O0"))) main(int argc, char
> *argv[])
> *val3 |= (unsigned long)0x6abc123a << 32;
> #endif
>
> +#warning The following code includes intentional warnings to demonstrate \
> + automatic type checking. Configure with --without-werror to \
> + compile this code.
> +
> /* register text dumps */
> /* "This is string 1.\n" */
> mcd_dump_data_register_text("tdump1.txt", 6, &dd[0],
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linutronix.de/pipermail/minicoredumper/attachments/20170510/9f4bc001/attachment.html>
More information about the minicoredumper
mailing list