This warning appears when you compile a program with GCC:
Warning:control reaches end of non-void function
It means: control reaches the end of a non-void function. That means some of your functions that should have a return value may not return any value after the end of the function. At this point, it's a good idea to check if each control flow has a return value.
"Android App performance optimization" p202
Hellorendering.rs file:
#pragmaVersion (1)#pragmaRS Java_package_name (Com.lenovo.vcs.test1)//automatically called when a script instance is createdvoidinit () {}introot () {floatRed = Rsrand (1.0f); floatGreen = Rsrand (1.0f); floatBlue = Rsrand (1.0f); //clear the background color of random colorsRsgclearcolor (Red,green,blue,1.0f); Error warning WARNING:IMPLICIT declaration of function ' Rsgclearcolor ' is invalid in C99//50 frames per second = 20 milliseconds per frame return -;}
Later found to have forgotten to include the header file #include "Rs_graphics.rsh"
Found in Eclipse. After the modification succeeds. The error will still be displayed. CTRL a-> CTRL X-> CTRL V
It's not showing the Red Cross,
Warning:control reaches end of non-void function and warning:implicit declaration of function ' Rsgclearcolor ' is invalid I N C99