<?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 Re: _io_tfs_install and const char * in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355583#M11587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand, I will check your request with developers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2014 19:57:48 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2014-09-12T19:57:48Z</dc:date>
    <item>
      <title>_io_tfs_install and const char *</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355580#M11584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this routine modify the first argument? If not why is it not const?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_io_tfs_install(TFS_ROOT, tfs_data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 18:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355580#M11584</guid>
      <dc:creator>razed11</dc:creator>
      <dc:date>2014-09-10T18:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: _io_tfs_install and const char *</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355581#M11585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the function&amp;nbsp; _io_dev_install_ext(char *identifier,....), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can see&amp;nbsp; this line&amp;nbsp; "if (&lt;EM&gt;identifier[i] == IO_DEV_DELIMITER)&lt;/EM&gt;".&amp;nbsp;&amp;nbsp;&amp;nbsp; if identifier is const ， maybe there will be a compiler error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; /* Search for delimiter */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; IO_MAXIMUM_NAME_LENGTH; i++) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (identifier[i] == IO_DEV_DELIMITER) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; found++;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (identifier[i] == '\0') {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } /* Endif */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; } /* Endfor */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 02:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355581#M11585</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2014-09-12T02:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: _io_tfs_install and const char *</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355582#M11586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel. This doesn't really answer the question. I understand that it will create a compiler warning. I'm suggesting that if the routine doesn't modify the value that the interface should declare identifier as const. That allows me to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const char *IDENTIFIER = "tfs:";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise I have to copy this to a buffer and it is clumsy for the client. A string literal will not create a compiler error even though it is technically const or at least not ensured to be. That is for historical reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the interface is changed to const char * then it is backward compatible. Using a literal is not good practice in my opinion especially if it must be used more than once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose this is less of a question and more of a feature request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:05:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355582#M11586</guid>
      <dc:creator>razed11</dc:creator>
      <dc:date>2014-09-12T19:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: _io_tfs_install and const char *</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355583#M11587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand, I will check your request with developers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/io-tfs-install-and-const-char/m-p/355583#M11587</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2014-09-12T19:57:48Z</dc:date>
    </item>
  </channel>
</rss>

