Rockbox Development > Starting Development and Compiling

Compiling errors: what do they mean?

(1/2) > >>

iPodFoo:
Hi.

Ive been learning to code and compile. I have some errors that crop up during build (it still builds and doesnt crash out though). They seem to be the most common.

I tried searching for what they could mean, but couldnt really find much. Can anyone explain what they specifically mean (if thats possible)?


--- Code: ---plugin.c:151: warning: initialization from incompatible pointer type
--- End code ---

--- Code: ---gui/gwps-common.c: In function `format_display':
gui/gwps-common.c:1767: warning: implicit declaration of function `hex_to_rgb'
--- End code ---

--- Code: ---/firmware/drivers/lcd-16bit.c: In function 'scroll thread':
line1004: warning 'fgcolor_orig' may be used uninitialised in this function.
--- End code ---

I think I figured out the warning: initialization from incompatible pointer type. Seems some code was missing integer names.

As for warning: implicit declaration of function and warning 'fgcolor_orig' may be used uninitialised in this function, I dont really know.

saratoga:

--- Quote ---As for warning: implicit declaration of function and warning 'fgcolor_orig'
--- End quote ---

This means the compiler doesn't see a definition of the function.  Definitions are those statements at the top of c files or in headers that list the arguments to a function:

int a_function(int arg 1, int *arg2);

Most likely you're getting the warning because you're calling a function that doesn't have one of those definitions.  See here for more info:

http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc07fundec.htm


--- Quote --- warning 'fgcolor_orig' may be used uninitialised in this function.
--- End quote ---

Probably means you have a variable that you use but don't ever actually give  a value to.

As for the other one, what variable type is "fgcolor_orig".  Its been a little while since I did plain c and I don't remember all the compiler warnings  :-[

iPodFoo:
Thanks saratoga. Makes things a bit clearer for me.

I have another, sort of error, when I use make install it crashes out with this:


--- Code: ---user@debian:~/rockbox-devel-181106/nano-sim$ make install
Consider upgrading to GNU make 3.81+ for optimum build performance.
installing a full setup in your archos dir
Consider upgrading to GNU make 3.81+ for optimum build performance.
/bin/sh: /home/user/rockbox-devel-181106/tools/buildzip.pl: /usr/bin/perl: bad interpreter: Permission denied
make[1]: *** [fullzip] Error 126
make: *** [install] Error 2
user@debian:~/rockbox-devel-181106/nano-sim$
--- End code ---

So I have to keep using su (super user) to be able to make it. This has only happened recently. I havent touched the pl file. Any ideas why this is cropping up?

pabouk:

--- Quote from: saratoga on December 03, 2006, 03:06:23 PM ---Definitions are those statements at the top of c files or in headers that list the arguments to a function:

int a_function(int arg 1, int *arg2);

--- End quote ---
I do not want to be nitpicking but actually this is called declaration. Definition of a function is something like:

--- Code: ---int a_function(int arg 1, int *arg2)
{
  function body...
}

--- End code ---
Otherwise I fully agree ;D


--- Code: ---plugin.c:151: warning: initialization from incompatible pointer type
--- End code ---
I do not know meaning of this but we could probably help you if you send some context of the warning (part of the code around the line 151 and the definitions of the used variables).


--- Code: ---/bin/sh: /home/user/rockbox-devel-181106/tools/buildzip.pl: /usr/bin/perl: bad interpreter: Permission denied
--- End code ---
This means that buildzip.pl is required to be interpreted by /usr/bin/perl (because its first line is #! /usr/bin/perl) but the interpreter (/usr/bin/perl) does not have the correct rights set. Try chmod a+x /usr/bin/perl. If it does not help send the otput of  ls -l /usr/bin/perl please.

iPodFoo:

--- Quote ---If it does not help send the otput of  ls -l /usr/bin/perl please.
--- End quote ---


--- Code: ---user@debian:/$ ls -l /usr/bin/perl
-rwxr-xr-x  2 root root 1057324 2006-01-12 15:13 /usr/bin/perl
user@debian:/$
--- End code ---

----------------------------------------------------

--- Code: ---plugin.c:151: warning: initialization from incompatible pointer type
--- End code ---

--- Quote ---we could probably help you if you send some context of the warning (part of the code around the line 151 and the definitions of the used variables).
--- End quote ---

Cut and pasted segment from plugin.c (dots are other lines, not worth putting in):

--- Code: ---#if LCD_DEPTH == 16
    lcd_bitmap_transparent_part,
    lcd_bitmap_transparent,
#endif
...
font_get_bits,
...
#endif
--- End code ---

It seems to stop giving errors if I add the int font at the end of this line in the plugin.h file like so:

--- Code: ---const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code, int font );
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version