<?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>topic HCS08 Compiler Warnings in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160595#M4397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to the CodeWarrior 10.1 environment and I am using the HCS08 Compiler for my project.&lt;/P&gt;&lt;P&gt;In my code I noticed that a static variable was being created and initialized at the start of a function but was never used and no warnings were thrown up.&lt;/P&gt;&lt;P&gt;Is there a -Wall argument to invoke somewhere for this compiler? How can I make sure this isn't happening elsewhere without scouring every file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 03:31:22 GMT</pubDate>
    <dc:creator>tayars</dc:creator>
    <dc:date>2012-05-08T03:31:22Z</dc:date>
    <item>
      <title>HCS08 Compiler Warnings</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160595#M4397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to the CodeWarrior 10.1 environment and I am using the HCS08 Compiler for my project.&lt;/P&gt;&lt;P&gt;In my code I noticed that a static variable was being created and initialized at the start of a function but was never used and no warnings were thrown up.&lt;/P&gt;&lt;P&gt;Is there a -Wall argument to invoke somewhere for this compiler? How can I make sure this isn't happening elsewhere without scouring every file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 03:31:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160595#M4397</guid>
      <dc:creator>tayars</dc:creator>
      <dc:date>2012-05-08T03:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08 Compiler Warnings</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160596#M4398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;yes, there is an option to ignore all warnings: -W2.&lt;/P&gt;&lt;P&gt;But the compiler will not produce a warning for an unreferenced static local. A static local variable is handled like a global variable (with different access scope, of course), an if it is not used, the linker will dead strip/remove it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you can find the information that it has been removed in the linker map file here:&lt;/P&gt;&lt;P&gt;*********************************************************************************************&lt;BR /&gt;UNUSED-OBJECTS SECTION&lt;BR /&gt;---------------------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you could use a tool like PC-lint to catch these kind of things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 03:50:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160596#M4398</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-05-08T03:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08 Compiler Warnings</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160597#M4399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi BK,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help. I was actually hoping the compiler would offer an option to turn on all warnings without the help of a tool like PC Lint. (The opposite of using -W2). But I shall concede defeat to another tool I guess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The information about the unused object sections is valuable, I did not know that kind of output was included in the map file. Thanks for that!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 22:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160597#M4399</guid>
      <dc:creator>tayars</dc:creator>
      <dc:date>2012-05-08T22:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08 Compiler Warnings</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160598#M4400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the S08 compiler is pretty verbose about variables/etc. But not in this case for static locals. Too bad in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 22:25:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS08-Compiler-Warnings/m-p/160598#M4400</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-05-08T22:25:10Z</dc:date>
    </item>
  </channel>
</rss>

