11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Error and Warning Messageschar * get_addr(void){char c;return &c; /* returning this is dangerous; the pointer could be dereferenced */}(366) operands of * not same pointer type (Parser)The operands of this operator are of different pointer types. This probably means you have usedthe wrong pointer, but if the code is actually what you intended, use a typecast to suppress the errormessage.(367) function is already "extern"; can’t be "static" (Parser)This function was already declared extern, possibly through an implicit declaration. It has nowbeen redeclared static, but this redeclaration is invalid.void main(void){set(10L, 6); /* at this point the compiler assumes set is extern... */}static void set(long a, int b) /* now it finds out otherwise */{PORTA = a + b;}(368) array dimension on *[] ignored (Preprocessor)An array dimension on a function parameter has been ignored because the argument is actuallyconverted to a pointer when passed. Thus arrays of any size may be passed. Either remove thedimension from the parameter, or define the parameter using pointer syntax, e.g.:int get_first(int array[10]) /* param should be: “int array[]” or “int *” */{ /* warning flagged here */return array[0];}275

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!