Keil™, An ARM® Company

Technical Support

RTX251: TRAFFIC2 EXAMPLE GENERATES WARNINGS


Information in this article applies to:

  • C251 Version 2.14
  • RTX251 Version 2.14

SYMPTOMS

When I try to build the TRAFFIC2 example of RTX251, I receive the following warning message in the TRAFFIC2.C file:

*** WARNING 151 IN LINE 223 OF TRAFFIC2.C: pointer truncation: 'edata' to 'idata'

CAUSE

This problem is caused by a function in the example that was not properly converted to C251 V2.14.

RESOLUTION

You must have the latest C251 tools (Version 2.14) as well as the latest RTX251 (Version 2.14).

The problem occurs because the readtime function is declared as follows:

bit readtime (char idata *buffer)  {
  unsigned char args;                          /* number of arguments       */

If you change the definition of this function and remove the idata memory specifier, everything compiles and runs without problems.

bit readtime (char *buffer)  {
  unsigned char args;                          /* number of arguments       */

This entire updated project is available for download. See below for information on how to obtain it.

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Last Reviewed: Saturday, May 28, 2005


Did this article provide the answer you needed?
 
Yes