<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>CodeWarrior for MCUのトピックWarning : C1801: Implicit parameter-declaration for 'unknown'</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146549#M3349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;After a bit of searching I find I can turn this warning into either an error or information or even turn it off.&amp;nbsp; Don't really want to do that because it's useful.&amp;nbsp; But I really don' t like spurious warnings showing up.&amp;nbsp; Too many and I have a tendancy to ignore the real once because I'm busy ignoring the ignorable ones.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm having trouble making the stdio.h library work without the C1801&amp;nbsp;error showing up.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void PutString(FILE *f, char * ptr ) {&amp;nbsp; char ch;&amp;nbsp; int res;&amp;nbsp;&amp;nbsp; ch = *ptr; while (ch) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ch = *ptr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ch != (char)0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // (void)putc(ch,f);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res = putc(ch,stdout);&amp;nbsp;&amp;nbsp; &amp;lt;=== Here's the error.&amp;nbsp; ptr++; }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;As shown in the code fragment I've taken it to the simplest form with stdout directly in the function call and not voiding the result. In the FILE declaration the write_channel declaration obviously doesn't have an argument. and the stdout definition supplies the address of the FILE structure&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;typedef struct chnl {...int&amp;nbsp;&amp;nbsp; (*write_channel)();&amp;nbsp; /* routine for port writes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */} FILE;FILE channels[1];#define&amp;nbsp; stdout&amp;nbsp;&amp;nbsp; (&amp;amp;channels[0])&lt;/PRE&gt;&lt;PRE&gt;#define putc(c,s)&amp;nbsp;&amp;nbsp; (*((s)-&amp;gt;write_channel))(c)&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As I see it inside the FILE structure there should be the declarations that avoid this error.&amp;nbsp; But for some reason I can't get that to work either.&amp;nbsp; What I tried is a structure called MFILE and the appropriate variables declared with this etc...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a solution or do I have to live with this?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;BR /&gt;John&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 08:47:52 GMT</pubDate>
    <dc:creator>jcdammeyer</dc:creator>
    <dc:date>2020-10-29T08:47:52Z</dc:date>
    <item>
      <title>Warning : C1801: Implicit parameter-declaration for 'unknown'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146549#M3349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;After a bit of searching I find I can turn this warning into either an error or information or even turn it off.&amp;nbsp; Don't really want to do that because it's useful.&amp;nbsp; But I really don' t like spurious warnings showing up.&amp;nbsp; Too many and I have a tendancy to ignore the real once because I'm busy ignoring the ignorable ones.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm having trouble making the stdio.h library work without the C1801&amp;nbsp;error showing up.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void PutString(FILE *f, char * ptr ) {&amp;nbsp; char ch;&amp;nbsp; int res;&amp;nbsp;&amp;nbsp; ch = *ptr; while (ch) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ch = *ptr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ch != (char)0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // (void)putc(ch,f);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res = putc(ch,stdout);&amp;nbsp;&amp;nbsp; &amp;lt;=== Here's the error.&amp;nbsp; ptr++; }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;As shown in the code fragment I've taken it to the simplest form with stdout directly in the function call and not voiding the result. In the FILE declaration the write_channel declaration obviously doesn't have an argument. and the stdout definition supplies the address of the FILE structure&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;typedef struct chnl {...int&amp;nbsp;&amp;nbsp; (*write_channel)();&amp;nbsp; /* routine for port writes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */} FILE;FILE channels[1];#define&amp;nbsp; stdout&amp;nbsp;&amp;nbsp; (&amp;amp;channels[0])&lt;/PRE&gt;&lt;PRE&gt;#define putc(c,s)&amp;nbsp;&amp;nbsp; (*((s)-&amp;gt;write_channel))(c)&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As I see it inside the FILE structure there should be the declarations that avoid this error.&amp;nbsp; But for some reason I can't get that to work either.&amp;nbsp; What I tried is a structure called MFILE and the appropriate variables declared with this etc...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a solution or do I have to live with this?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;BR /&gt;John&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146549#M3349</guid>
      <dc:creator>jcdammeyer</dc:creator>
      <dc:date>2020-10-29T08:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Warning : C1801: Implicit parameter-declaration for 'unknown'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146550#M3350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Which CPU are you targeting (HC08, HC12, Coldfire, ..)&lt;BR /&gt;- Which version of CodeWarrior are you using?&lt;BR /&gt;To retrieve that info:&lt;BR /&gt;- Start CodeWarrior&lt;BR /&gt;- Select Help -&amp;gt; About Freescale CodeWarrior&lt;BR /&gt;- Click on "Install Products"&lt;BR /&gt;- CodeWarrior version used is displayed on top in the Installed Products dialog.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 18:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146550#M3350</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-01-27T18:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Warning : C1801: Implicit parameter-declaration for 'unknown'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146551#M3351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;int (*write_channel)();&lt;BR /&gt;&lt;BR /&gt;#define putc(c,s) (*((s)-&amp;gt;write_channel))(c)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If this was found in the stdio library, the compiler does not conform to ISO C. Type casting a function pointer to another function pointer of different type is undefined behavior in ISO C.&lt;BR /&gt;&lt;BR /&gt;Perhaps it is safe to patch the compiler lib and write&lt;BR /&gt;&lt;BR /&gt;int (*write_channel)(int);&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 21:46:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146551#M3351</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2009-01-27T21:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Warning : C1801: Implicit parameter-declaration for 'unknown'</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146552#M3352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;There is no cast in this code and therefore the remark about ISO C does not apply.&lt;BR /&gt;Not specifying anything in an argument list is indeed an implicit parameter declaration, therefore the compiler message is correct and the actual function pointer must have an int as argument. As Lundin suggested, adding the int in the prototype will avoid the message (and catch the incorrect usages of the function pointer the implicit parameter declaration warns about).&lt;BR /&gt;&lt;BR /&gt;Is this indirect output via function pointer necessary? Most of the time for 8/16 bit a simple output via named functions is used.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 23:53:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Warning-C1801-Implicit-parameter-declaration-for-unknown/m-p/146552#M3352</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-01-27T23:53:05Z</dc:date>
    </item>
  </channel>
</rss>

