ARM Technical Support Knowledge Articles

TRAFFIC2 EXAMPLE GENERATES WARNINGS

Applies to: RTX251 Real-time Kernel

Answer


Information in this article applies to:


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.

Article last edited on: 2005-05-28 22:40:54

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential