<?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: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443300#M26097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the I had a look at the help on components:&lt;/P&gt;&lt;P&gt;I see there is a Sendblock under Asynchroserial and a Sendblock under SerialLdd1:Serial_Ldd&lt;/P&gt;&lt;P&gt;I'm not sure of the difference - &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Asynchroserial&amp;nbsp; says 'sends a block to the channel'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SerialLdd1:Serial_Ldd says 'sends a block of charaters'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Apr 2015 09:57:57 GMT</pubDate>
    <dc:creator>russellsher</dc:creator>
    <dc:date>2015-04-25T09:57:57Z</dc:date>
    <item>
      <title>'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443291#M26088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I am using processor expert to make a uart as below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; char OutData[] = "Hello world";&lt;/P&gt;&lt;P&gt;&amp;nbsp; LDD_TError Error;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LDD_TDeviceData *MySerialPtr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp; PE_low_level_init();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*** End of Processor Expert internal initialization.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Write your code here */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set_Led_SetVal();&amp;nbsp; // Led on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; AS1_SendChar('A'); // Send a Char&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Error = AS1_SendBlock(MySerialPtr, OutData, sizeof(OutData)); /* Send block of characters */&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this warning:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;passing argument 2 of 'AS1_SendBlock' makes integer from pointer without a cast [enabled by default]&lt;/P&gt;&lt;P&gt;passing argument 3 of 'AS1_SendBlock' makes pointer from integer without a cast [enabled by default]&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I'm not quite sure what I should change, any advice?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 15:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443291#M26088</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-24T15:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443292#M26089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rusell.&lt;/P&gt;&lt;P&gt;Can you send me the project so I can check it , to see whats going wrong, by the way, those are warnings&amp;nbsp; and should let your code debug.&lt;/P&gt;&lt;P&gt;but&amp;nbsp; send me the project I'll check it&amp;nbsp; to see whats wrong.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;-Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 16:31:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443292#M26089</guid>
      <dc:creator>Jonathan_Iglesias</dc:creator>
      <dc:date>2015-04-24T16:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443293#M26090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi and Thanks&lt;/P&gt;&lt;P&gt;I have attached the project as a zipped file.&lt;/P&gt;&lt;P&gt;(Freedom_1&amp;nbsp;&amp;nbsp; -- after freedom board&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 18:25:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443293#M26090</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-24T18:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443294#M26091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had commented out that line, so just take out the comment in front of the line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Error = AS1_SendBlock(MySerialPtr, OutData, sizeof(OutData)); /* Send block of characters */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to show the warning.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 18:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443294#M26091</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-24T18:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443295#M26092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rusell.&lt;/P&gt;&lt;P&gt;Now I see whats the problem,&amp;nbsp; the function receive this parameters:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AS1_SendBlock(AS1_TComData *, word , word *) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Word&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; it's declared as &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;Unsigned Short, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What you are sending it's &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;AS1_SendBlock(LDD_TDeviceData, char *, int);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;the problem here it's the types because for instance in the second argument, you are sending a string&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CodeWarrior automatically&amp;nbsp; cast it for you thats why the problem its a warning and say [ENABLED BY DEFAULT]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;what you can do it's the casting befor you send the&amp;nbsp; parameters for example in the sizeof&amp;nbsp; this function return and int what you can do it's this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;word test=sizeof(OutData);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;then just send in the function the &amp;amp;test. and the same for the string.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;please let me know if it helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;-Jonathan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2015 21:26:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443295#M26092</guid>
      <dc:creator>Jonathan_Iglesias</dc:creator>
      <dc:date>2015-04-24T21:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443296#M26093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johnathan - thanks for replying:&lt;/P&gt;&lt;P&gt;Ok, for the sizeof, I did the cast like you said, so I think that one is ok:&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp; word test=sizeof(OutData); &lt;/P&gt;&lt;P&gt; Error = AS1_SendBlock(MySerialPtr, OutData, &amp;amp;test); /* Send block of characters */&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Is that correct? Now I'm not quite sure how to cast the Outdata parameter&lt;/P&gt;&lt;P&gt;Could you give an example for that bitplease.&lt;/P&gt;&lt;P&gt;thank-you&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 09:05:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443296#M26093</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-25T09:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443297#M26094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Russel,&lt;/P&gt;&lt;P&gt;I think you are using the AsynchroSerial component (not the LDD?) (I have not checked your project)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interface is the following:&lt;/P&gt;&lt;P&gt;byte AS1_SendBlock(AS1_TComData *Ptr, word Size, word *Snd);&lt;/P&gt;&lt;P&gt;(see the implementation/header file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to you need to use it that way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;byte res;&lt;/P&gt;&lt;P&gt;byte OutData[] = "Hello";&lt;/P&gt;&lt;P&gt;word snt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;res = AS1_SendBlock(OutData, strlen(OutData), &amp;amp;snt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, there is online help for the components, see &lt;A href="http://mcuoneclipse.com/2012/11/12/getting-help-on-processor-expert-components/" title="http://mcuoneclipse.com/2012/11/12/getting-help-on-processor-expert-components/"&gt;Getting Help on Processor Expert Components | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 09:37:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443297#M26094</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-04-25T09:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443298#M26095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit: Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;nbsp; word test=sizeof(OutData);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Error = AS1_SendBlock(MySerialPtr, test, &amp;amp;test); /* Send block of characters */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 09:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443298#M26095</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-25T09:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443299#M26096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich&amp;nbsp; Thanks for reply, yes I am using the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;AsynchroSerial component&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;I'll check out the online help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Although I was using the example from: &lt;/SPAN&gt;Serial_LDD Embedded Component User Guide which gave:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 09:47:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443299#M26096</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-25T09:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443300#M26097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the I had a look at the help on components:&lt;/P&gt;&lt;P&gt;I see there is a Sendblock under Asynchroserial and a Sendblock under SerialLdd1:Serial_Ldd&lt;/P&gt;&lt;P&gt;I'm not sure of the difference - &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Asynchroserial&amp;nbsp; says 'sends a block to the channel'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;SerialLdd1:Serial_Ldd says 'sends a block of charaters'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 09:57:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443300#M26097</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-25T09:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443301#M26098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, that's not correct.&lt;/P&gt;&lt;P&gt;sizeof() returns the size of the type/object in memory. In your case, OutData is an array with a string, and sizeof() will return the size of the string (in your case!!) including the zero byte at the end.&lt;/P&gt;&lt;P&gt;so sizeof("hello") will be 6, while strlen("hello") will be 5 (without the zero byte at the end).&lt;/P&gt;&lt;P&gt;You need to pass the length (number of characters), so either use sizeof(OutData)-1&amp;nbsp; or strlen(OutData).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep in mind that in your case sizeof() is applied to an array (and *not* to a pointer). Using sizeof() on an array returns the size of the array. Using sizeof() on a pointer returns the size of the pointer (usually 4 bytes on a 32bit architecture).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 07:18:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443301#M26098</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-04-26T07:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: 'AS1_SendBlock' makes integer from pointer without a cast --- warning</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443302#M26099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for the helpful replies&lt;/P&gt;&lt;P&gt;I do get a warning&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign]&lt;/TD&gt;&lt;TD&gt;main.c&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;if I do:&lt;/P&gt;&lt;P&gt;Error = AS1_SendBlock(OutData, strlen(OutData), &amp;amp;snt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can avoid the warning if I do:&lt;/P&gt;&lt;P&gt;Error = AS1_SendBlock(OutData, strlen((const char*)OutData), &amp;amp;snt);&lt;/P&gt;&lt;P&gt;Does this look like a 'proper' fix?&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 10:48:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AS1-SendBlock-makes-integer-from-pointer-without-a-cast-warning/m-p/443302#M26099</guid>
      <dc:creator>russellsher</dc:creator>
      <dc:date>2015-04-26T10:48:47Z</dc:date>
    </item>
  </channel>
</rss>

