Keil Logo Arm Logo

Discussion Forum

embedding text in the code

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Phil Gibbs
Posted
4-Jun-2001 22:14 GMT
Toolset
C51
New! embedding text in the code
I am using Keil version 5.0, and want to embed unreferenced text in a source file e.g.

static code char desc[] ="Version 1.20";

How can I do this without getting a WARNING 16: UNCALLED SEGMENT error?

Cheers
Phil
Read-Only
Author
Andrew Neil
Posted
4-Jun-2001 22:44 GMT
Toolset
C51
New! RE: embedding text in the code
Do you ever reference the code?
Or is this just some text you want to be able to see via your debugger, or whatever?

If it's never referenced, then you'll obviously get a warning (16) to that effect!
Read-Only
Author
Jon Young
Posted
5-Jun-2001 00:07 GMT
Toolset
C51
New! RE: embedding text in the code
The only way I could get rid of the message is to add the following somewhere in the code.

char *dummy = desc;

Read-Only
Author
Jon Young
Posted
5-Jun-2001 00:55 GMT
Toolset
C51
New! RE: embedding text in the code
This is not a problem with latest version of the compiler.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.