mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Make thirty functions static to reduce binary size
If any of those functions should be (unused) API functions, they can easily be turned back once really needed. Detected using a new cppcheck check that uses the internal symbol database to catch functions that are only used in the current file. Change-Id: Ic2b1e5b8020b76397f11cefc4e205f3b7ac1f184
This commit is contained in:
parent
c907e127f8
commit
fdd4aef340
10 changed files with 30 additions and 30 deletions
|
@ -69,7 +69,7 @@ UINT32 Read32(UINT8* pByte)
|
|||
}
|
||||
|
||||
|
||||
UINT32 CalcCRC32 (const UINT8* buf, UINT32 len)
|
||||
static UINT32 CalcCRC32 (const UINT8* buf, UINT32 len)
|
||||
{
|
||||
static const UINT32 crc_table[256] =
|
||||
{ // CRC32 lookup table for polynomial 0x04C11DB7
|
||||
|
@ -127,7 +127,7 @@ UINT32 CalcCRC32 (const UINT8* buf, UINT32 len)
|
|||
}
|
||||
|
||||
|
||||
UINT32 PlaceImage(char* filename, UINT32 pos, UINT8* pFirmware, UINT32 limit)
|
||||
static UINT32 PlaceImage(char* filename, UINT32 pos, UINT8* pFirmware, UINT32 limit)
|
||||
{
|
||||
UINT32 size, read;
|
||||
FILE* pFile;
|
||||
|
|
|
@ -21,7 +21,7 @@ int main(void);
|
|||
tpMain start_vector[] __attribute__ ((section (".startvector"))) = {main};
|
||||
|
||||
|
||||
UINT8 uart_read(void)
|
||||
static UINT8 uart_read(void)
|
||||
{
|
||||
UINT8 byte;
|
||||
while (!(SSR1 & SCI_RDRF)); // wait for char to be available
|
||||
|
@ -31,7 +31,7 @@ UINT8 uart_read(void)
|
|||
}
|
||||
|
||||
|
||||
void uart_write(UINT8 byte)
|
||||
static void uart_write(UINT8 byte)
|
||||
{
|
||||
while (!(SSR1 & SCI_TDRE)); // wait for transmit buffer empty
|
||||
TDR1 = byte;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue