What do these "warnings" mean in robotc?

In my robotc program, when I compile the program I always get these warnings at the bottom which says:

Warning:Unreferenced function ‘UserControlCodePlaceholderForTesting’
Warning:Unreferenced function ‘AutonomousCodePlaceholderForTesting’

Does anyone know what this means, and how I can get rid of it?

Means you didn’t use those functions in your code.

IE, HEY THERE’S UNUSED STUFF HERE, you should probably get rid of it or use it or something.

As Cody said, these warnings pop up when you have declared a variable or appear to have started defining a function but never used that variable or function later on in your program.

If you still want to keep those words in your program as a place holder, you can simply comment them out.

It just means that robot C is saying “Umm what is this is doesn’t do anything yet please use it or get rid of it.” Sometimes it will do it if it auto added in something like a semi colon. No big deal.

its not your fault, comment them out of the Vex_Competition_Includes.c include if its too annoying

Rather than commenting them out, uncheck the preference to create these warnings (which is on as default).


Could someone give me an example of “commenting” something out, because I don’t know what that means.

Comments in code are not interpreted AT ALL by the compiler.

Comments look like this:

// I'm a comment!

or this:

 * I'm a block comment!

So basically put // in front of a single line of code or surround a bunch of code with /* and */

What Cody said. Plus you can read the following:

There is also this nifty link:


Alright that makes sense, I guess I already knew what commenting was, but I have lots of comments all over my program, (in autonomous and user control) but the warnings are still there. I have all my comments in the // or /* … */.

By “commenting out” the parts of your code that are giving you problems, this is what I was talking about:

// UserControlCodePlaceholderForTesting
// ...any other lines of code that might be part of this place holder.

// ...any other lines of code that might be part of this place holder.

After commenting them out, your “words” (AutonomousCodePlaceholderForTesting, etc.) would now remain in your program as comments to help remind you of what you will write there later, but the RobotC compiler will no longer see those words and think you made some sort of mistake. What these warnings are trying to tell you is that you appear to have created some kind of functions in your code, but you’re not using them anywhere later on in your program. By “commenting out” that section of code, you are preventing the compiler from seeing those functions, freaking out and issuing you a warning.

I have been avoiding using block comments /* and / because my kids’ version of RobotC (3.62??) )would sometimes connect two unrelated pairs of / and */ and comment out huge sections of code. So I tell them to use // just to be safe. It’s a killer, however, during debugging.

Okay, I still can’t figure it out. So instead I just turned it off in the settings. But thanks anyway for trying to help me!

That’s really the best way to do it anyway, you really should leave Vex_Competition_Includes.c alone or use a copy if you want to change it.

That’s not a problem with ROBOTC as far as I know, were they by any chance nested?