<?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: warning #2226-D: invalid format string conversion in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696113#M659067</link>
    <description>&lt;!--!*#--&gt;&amp;gt; [...] "%-5d%-20s%\n-20s%-20s\n" [...]&lt;BR /&gt;&lt;BR /&gt;In there, I see: "%-5d", "%-20s", "%\n-20s",&lt;BR /&gt;and "%-20s\n".  That third one troubles me.&lt;BR /&gt;"HP C V7.3-009 on OpenVMS Alpha V8.3" doesn't&lt;BR /&gt;seem to like it much, either:&lt;BR /&gt;&lt;BR /&gt;alp $ type fmt.c&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main( void)&lt;BR /&gt;{&lt;BR /&gt;    char *cs1 = "cs1";&lt;BR /&gt;    char *cs2 = "cs2";&lt;BR /&gt;    char *cs3 = "cs3";&lt;BR /&gt;    int i1 = 1;&lt;BR /&gt;&lt;BR /&gt;    printf( "%-5d%-20s%\n-20s%-20s\n",&lt;BR /&gt;     i1, cs1, cs2, cs3);&lt;BR /&gt;}&lt;BR /&gt;alp $ cc fmt.c&lt;BR /&gt;&lt;BR /&gt;    printf( "%-5d%-20s%\n-20s%-20s\n",&lt;BR /&gt;............^&lt;BR /&gt;%CC-W-BADCONVSPEC, In this statement, this argument to printf contains a bad conversion specification "%&lt;BR /&gt;                        " that will cause unpredictable behavior.&lt;BR /&gt;at line number 10 in file ALP$DKA0:[SMS.ITRC]fmt.c;1&lt;BR /&gt;&lt;BR /&gt;Note that it seems to be complaining about&lt;BR /&gt;the "%\n".&lt;/STDIO.H&gt;</description>
    <pubDate>Wed, 06 Oct 2010 19:03:43 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2010-10-06T19:03:43Z</dc:date>
    <item>
      <title>warning #2226-D: invalid format string conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696112#M659066</link>
      <description>I get the following warning when trying to compile some C code:&lt;BR /&gt;&lt;BR /&gt;        cc -D_USE_BIG_FDS -Ae -DHPUX -DORAIA64 -DHPUX_IA64 +DD64 -DSS_64B  -IT_S&lt;BR /&gt;ERVER -DHPPA64 -DSLS8NATIVE -DSLU8NATIVE +DD64 -DSS_64BIT_SERVER /u01/app/oracle&lt;BR /&gt;/product/11.2.0/clnt/precomp/public/ -c CacheUtils.c&lt;BR /&gt;"CacheUtils.c", line 30: warning #2226-D: invalid format string conversion&lt;BR /&gt;                        g_cache_db_criterias[i].ac_where_clause_02,g_cache_db_cr&lt;BR /&gt;iterias[i].ac_from_clause);&lt;BR /&gt;&lt;BR /&gt;Here are the lines of code that are causing the problem:&lt;BR /&gt;&lt;BR /&gt;                  printf("%-5d%-20s%\n-20s%-20s\n",g_cache_db_criterias[i]&lt;BR /&gt;.i_criteria_id,g_cache_db_criterias[i].ac_where_clause_01,\&lt;BR /&gt;                            g_cache_db_criterias[i].ac_where_clause_02,g_cac&lt;BR /&gt;he_db_criterias[i].ac_from_clause);&lt;BR /&gt;&lt;BR /&gt;Why am I getting this warning and how do I resolve it?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Curtis</description>
      <pubDate>Wed, 06 Oct 2010 18:37:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696112#M659066</guid>
      <dc:creator>Curtis Deese</dc:creator>
      <dc:date>2010-10-06T18:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: warning #2226-D: invalid format string conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696113#M659067</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] "%-5d%-20s%\n-20s%-20s\n" [...]&lt;BR /&gt;&lt;BR /&gt;In there, I see: "%-5d", "%-20s", "%\n-20s",&lt;BR /&gt;and "%-20s\n".  That third one troubles me.&lt;BR /&gt;"HP C V7.3-009 on OpenVMS Alpha V8.3" doesn't&lt;BR /&gt;seem to like it much, either:&lt;BR /&gt;&lt;BR /&gt;alp $ type fmt.c&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main( void)&lt;BR /&gt;{&lt;BR /&gt;    char *cs1 = "cs1";&lt;BR /&gt;    char *cs2 = "cs2";&lt;BR /&gt;    char *cs3 = "cs3";&lt;BR /&gt;    int i1 = 1;&lt;BR /&gt;&lt;BR /&gt;    printf( "%-5d%-20s%\n-20s%-20s\n",&lt;BR /&gt;     i1, cs1, cs2, cs3);&lt;BR /&gt;}&lt;BR /&gt;alp $ cc fmt.c&lt;BR /&gt;&lt;BR /&gt;    printf( "%-5d%-20s%\n-20s%-20s\n",&lt;BR /&gt;............^&lt;BR /&gt;%CC-W-BADCONVSPEC, In this statement, this argument to printf contains a bad conversion specification "%&lt;BR /&gt;                        " that will cause unpredictable behavior.&lt;BR /&gt;at line number 10 in file ALP$DKA0:[SMS.ITRC]fmt.c;1&lt;BR /&gt;&lt;BR /&gt;Note that it seems to be complaining about&lt;BR /&gt;the "%\n".&lt;/STDIO.H&gt;</description>
      <pubDate>Wed, 06 Oct 2010 19:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696113#M659067</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-10-06T19:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: warning #2226-D: invalid format string conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696114#M659068</link>
      <description>&amp;gt;printf("%-5d%-20s%\n-20s%-20s\n"&lt;BR /&gt;&lt;BR /&gt;If it isn't obvious, you probably want:&lt;BR /&gt; printf("%-5d%-20s\n%-20s%-20s\n"</description>
      <pubDate>Thu, 07 Oct 2010 03:53:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696114#M659068</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-07T03:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: warning #2226-D: invalid format string conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696115#M659069</link>
      <description>&lt;BR /&gt;printf("%-5d%-20s\n%-20s%-20s\n" &lt;BR /&gt;&lt;BR /&gt;resolved the problem.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Curtis</description>
      <pubDate>Thu, 07 Oct 2010 11:44:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/warning-2226-d-invalid-format-string-conversion/m-p/4696115#M659069</guid>
      <dc:creator>Curtis Deese</dc:creator>
      <dc:date>2010-10-07T11:44:46Z</dc:date>
    </item>
  </channel>
</rss>

