<div dir="ltr">Hi John,<div><br></div><div>I like to get the issue solved w/o turning on --compile-werror, </div><div>but if you want to keep the code as is it would be great if you apply your patch</div><div><br></div><div>/Anders <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">tis 9 maj 2017 kl 09:32 skrev John Ogness <<a href="mailto:john.ogness@linutronix.de">john.ogness@linutronix.de</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2017-04-24, Anders Wallin <<a href="mailto:wallinux@gmail.com" target="_blank">wallinux@gmail.com</a>> wrote:<br>
> If configure is run with "--with-minicoredumper_demo" the build will<br>
> fail due to missing typecasts.<br>
<br>
Actually, these errors were intentional. The demo is not particularly<br>
interesting as a runtime example. It is more interesting for developers<br>
as an API example. Part of that example was to demonstrate that each<br>
pointer argument is typecasted based on the length modifier and<br>
conversion specifier associated with that argument.<br>
<br>
Whenever I want to compile the demo program<br>
(--with-minicoredumper_demo), I also add --without-werror. I _want_ to<br>
see those warnings as it is proof for me that the automatic type<br>
checking is working.<br>
<br>
Perhaps I should modify main.c like this? Any thoughts?<br>
<br>
John Ogness<br>
<br>
<br>
--- a/src/minicoredumper_demo/main.c<br>
+++ b/src/minicoredumper_demo/main.c<br>
@@ -62,6 +62,10 @@ int __attribute__((optimize("O0"))) main(int argc, char *argv[])<br>
        *val3 |= (unsigned long)0x6abc123a << 32;<br>
 #endif<br>
<br>
+#warning The following code includes intentional warnings to demonstrate \<br>
+        automatic type checking. Configure with --without-werror to \<br>
+        compile this code.<br>
+<br>
        /* register text dumps */<br>
        /* "This is string 1.\n" */<br>
        mcd_dump_data_register_text("tdump1.txt", 6, &dd[0],<br>
</blockquote></div>