mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update -Wall -Werror
This commit is contained in:
parent
2c29a376ba
commit
7cb9553f73
102 changed files with 3686 additions and 3504 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "rtl8195a.h"
|
||||
#include "rtl_bios_data.h"
|
||||
#include "osdep_api.h"
|
||||
#include "osdep_service.h"
|
||||
#if defined(configUSE_WAKELOCK_PMU) && (configUSE_WAKELOCK_PMU == 1)
|
||||
#include "freertos_pmu.h"
|
||||
#else
|
||||
|
|
@ -44,7 +45,7 @@ IN u8 EchoFlag);
|
|||
//_LONG_CALL_ extern void UartLogCmdExecute(IN PUART_LOG_CTL pUartLogCtlExe);
|
||||
//======================================================
|
||||
extern PCOMMAND_TABLE UartLogRamCmdTable[];
|
||||
extern UartLogRamCmdTableSize;
|
||||
extern int UartLogRamCmdTableSize;
|
||||
//======================================================
|
||||
//<Function>: UartLogIrqHandleRam
|
||||
//<Usage >: To deal with Uart-Log RX IRQ
|
||||
|
|
@ -61,7 +62,7 @@ void UartLogIrqHandleRam(void * Data) {
|
|||
if (UartReceiveData == 0) {
|
||||
goto exit;
|
||||
}
|
||||
PUART_LOG_CTL p = pUartLogCtl;
|
||||
PUART_LOG_CTL p = (PUART_LOG_CTL) pUartLogCtl;
|
||||
//KB_ESC chk is for cmd history, it's a special case here.
|
||||
if (UartReceiveData == KB_ASCII_ESC) {
|
||||
// Esc detection is only valid in the first stage of boot sequence (few seconds)
|
||||
|
|
@ -102,7 +103,7 @@ void UartLogIrqHandleRam(void * Data) {
|
|||
if (p->pTmpLogBuf != NULL) {
|
||||
p->ExecuteCmd = _TRUE;
|
||||
if (p->TaskRdy) {
|
||||
RtlUpSemaFromISR((_Sema *) &pUartLogCtl->Sema);
|
||||
rtw_up_sema_from_isr((_Sema *) &pUartLogCtl->Sema);
|
||||
}
|
||||
} else {
|
||||
ArrayInitialize((u8 *) pUartLogCtl->pTmpLogBuf->UARTLogBuf,
|
||||
|
|
@ -130,7 +131,7 @@ int GetArgvRam(IN u8 *pstr, u8** argv) {
|
|||
int arvc = 0;
|
||||
// u8** argv = ArgvArray;
|
||||
u8* p = pstr;
|
||||
u8 t, n = ' ';
|
||||
u8 t = 0, n = ' ';
|
||||
int m = 0;
|
||||
while(*p != 0
|
||||
&& *p != '\r'
|
||||
|
|
@ -200,7 +201,7 @@ int GetArgvRam(IN u8 *pstr, u8** argv) {
|
|||
//<Notes >:
|
||||
//======================================================
|
||||
MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
||||
PUART_LOG_CTL p = pUartLogCtl;
|
||||
PUART_LOG_CTL p = (PUART_LOG_CTL) pUartLogCtl;
|
||||
#ifdef USE_ROM_CONSOLE // show Help
|
||||
p->pTmpLogBuf->UARTLogBuf[0] = '?';
|
||||
p->pTmpLogBuf->BufCount = 1;
|
||||
|
|
@ -208,7 +209,7 @@ MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
|||
#endif
|
||||
do {
|
||||
p->TaskRdy = _TRUE;
|
||||
RtlDownSema(&p->Sema);
|
||||
rtw_down_sema(&p->Sema);
|
||||
if (p->ExecuteCmd) {
|
||||
// UartLogCmdExecute(pUartLogCtl);
|
||||
int argc = GetArgvRam(p->pTmpLogBuf->UARTLogBuf, ArgvArray);
|
||||
|
|
@ -225,9 +226,9 @@ MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
|||
flg = 0;
|
||||
if(pcmd->ArgvCnt < argc) {
|
||||
#ifdef USE_ROM_CONSOLE
|
||||
pcmd->func(argc-1, &ArgvArray[1]);
|
||||
pcmd->func(argc-1, (char **) &ArgvArray[1]);
|
||||
#else
|
||||
pcmd->func(argc, &ArgvArray);
|
||||
pcmd->func(argc, (char **) &ArgvArray);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef USE_ROM_CONSOLE
|
||||
|
|
@ -291,7 +292,7 @@ MON_RAM_TEXT_SECTION void console_init(void) {
|
|||
#endif
|
||||
pUartLogCtl->RevdNo = UART_LOG_HISTORY_LEN;
|
||||
// Create a Semaphone
|
||||
RtlInitSema(&pUartLogCtl->Sema, 1);
|
||||
rtw_init_sema((_sema *)&pUartLogCtl->Sema, 1);
|
||||
// executing boot sequence
|
||||
pUartLogCtl->ExecuteCmd = _FALSE;
|
||||
pUartLogCtl->ExecuteEsc = _TRUE; //don't check Esc anymore
|
||||
|
|
@ -316,7 +317,7 @@ extern char str_rom_57ch3Dch0A[]; // "==========================================
|
|||
_WEAK void console_help(int argc, char *argv[]) { // Help
|
||||
DiagPrintf("CONSOLE COMMAND SET:\n");
|
||||
DiagPrintf(&str_rom_57ch3Dch0A[25]); // DiagPrintf("==============================\n");
|
||||
PCOMMAND_TABLE pcmdtab = UartLogRamCmdTable;
|
||||
PCOMMAND_TABLE pcmdtab = (PCOMMAND_TABLE) UartLogRamCmdTable;
|
||||
while(pcmdtab->cmd) {
|
||||
#ifdef USE_ROM_CONSOLE
|
||||
DiagPrintf(pcmdtab->msg);
|
||||
|
|
@ -327,7 +328,8 @@ _WEAK void console_help(int argc, char *argv[]) { // Help
|
|||
}
|
||||
DiagPrintf(&str_rom_57ch3Dch0A[25]); // DiagPrintf("==============================\n");
|
||||
}
|
||||
LOCAL void print_on(int argc, char *argv[])
|
||||
|
||||
void print_on(int argc, char *argv[])
|
||||
{
|
||||
print_off = argv[1][0]!='1';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,22 @@ extern _LONG_CALL_ double __rtl_dsub_v1_00(double a, double b);
|
|||
extern _LONG_CALL_ double __rtl_dmul_v1_00(double a, double b);
|
||||
extern _LONG_CALL_ double __rtl_ddiv_v1_00(double a, double b);
|
||||
|
||||
// --- ???
|
||||
extern _LONG_CALL_ float __rtl_dtof_v1_00(double d);
|
||||
extern _LONG_CALL_ int __rtl_dtoui_v1_00(double d);
|
||||
extern _LONG_CALL_ float __rtl_itof_v1_00(int val);
|
||||
extern _LONG_CALL_ char *__rtl_ltoa_v1_00(int value, char *string, int radix);
|
||||
extern _LONG_CALL_ char *__rtl_ultoa_v1_00(unsigned int value, char *string, int radix);
|
||||
extern _LONG_CALL_ int __rtl_ftol_v1_00(float f);
|
||||
extern _LONG_CALL_ int __rtl_ftod_v1_00(float f);
|
||||
extern _LONG_CALL_ float __rtl_fadd_v1_00(float a, float b);
|
||||
extern _LONG_CALL_ float __rtl_fsub_v1_00(float a, float b);
|
||||
extern _LONG_CALL_ float __rtl_fmul_v1_00(float a, float b);
|
||||
extern _LONG_CALL_ float __rtl_fdiv_v1_00(float a, float b);
|
||||
extern _LONG_CALL_ int __rtl_dcmple_v1_00(double a, double b);
|
||||
extern _LONG_CALL_ int __rtl_fcmplt_v1_00(float a, float b);
|
||||
extern _LONG_CALL_ int __rtl_fcmpgt_v1_00(float a, float b);
|
||||
// --- ???
|
||||
|
||||
//
|
||||
// mprec
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
#define strsep __rtl_strsep_v1_00
|
||||
#define strtok __rtl_strtok_v1_00
|
||||
|
||||
static char toupper(char ch) {
|
||||
extern int isdigit (int c);
|
||||
|
||||
static int toupper(int ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
};
|
||||
|
||||
|
|
@ -371,7 +373,7 @@ llatob(u_quad_t *vp, char *p, int base)
|
|||
char *
|
||||
btoa(char *dst, u_int value, int base)
|
||||
{
|
||||
char buf[34], digit;
|
||||
char buf[34], digit = 0;
|
||||
int i, j, rem, neg;
|
||||
|
||||
if (value == 0) {
|
||||
|
|
@ -417,7 +419,7 @@ btoa(char *dst, u_int value, int base)
|
|||
char *
|
||||
llbtoa(char *dst, u_quad_t value, int base)
|
||||
{
|
||||
char buf[66], digit;
|
||||
char buf[66], digit = 0;
|
||||
int i, j, rem, neg;
|
||||
|
||||
if (value == 0) {
|
||||
|
|
@ -536,7 +538,7 @@ c_vsprintf (char *d, const char *s, va_list ap)
|
|||
const char *t;
|
||||
char *p, *dst, tmp[40];
|
||||
unsigned int n;
|
||||
int fmt, trunc, haddot, width, base, longlong;
|
||||
int fmt, trunc, haddot, width, base = 0, longlong;
|
||||
double dbl;
|
||||
#ifndef NEWFP
|
||||
EP ex;
|
||||
|
|
@ -1072,11 +1074,14 @@ int c_printf(const char *fmt, ...)
|
|||
|
||||
#endif // ENAC_FLOAT
|
||||
|
||||
extern _LONG_CALL_ROM_ void HalSerialPutcRtl8195a(char c);
|
||||
|
||||
int puts (const char *s)
|
||||
{
|
||||
while(*s) {
|
||||
HalSerialPutcRtl8195a(*s++);
|
||||
}
|
||||
return 0; // -1 -> EOF
|
||||
}
|
||||
|
||||
void vTaskDelete(void *);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@ int rtl_vprintf(const char *fmt, va_list param) {
|
|||
int rtl_vsnprintf(char *str, size_t size, const char *fmt, va_list param) {
|
||||
int result;
|
||||
int w;
|
||||
int v11;
|
||||
FILE f;
|
||||
#if CHECK_LIBC_INIT
|
||||
if (!libc_has_init) {
|
||||
|
|
|
|||
|
|
@ -122,6 +122,6 @@ void init_rom_libgloss_ram_map(void) {
|
|||
rom_libgloss_ram_map.libgloss_open = ram_libgloss_open;
|
||||
rom_libgloss_ram_map.libgloss_read = ram_libgloss_read;
|
||||
rom_libgloss_ram_map.libgloss_write = ram_libgloss_write;
|
||||
rom_libgloss_ram_map.libgloss_sbrk = ram_libgloss_sbrk;
|
||||
rom_libgloss_ram_map.libgloss_sbrk = (void*)ram_libgloss_sbrk;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,12 @@ unsigned long long __aeabi_llsr(unsigned long long val, unsigned int shift);
|
|||
|
||||
extern struct _reent * _rtl_impure_ptr;
|
||||
|
||||
#if CHECK_LIBC_INIT
|
||||
extern char libc_has_init;
|
||||
#endif
|
||||
extern char print_off;
|
||||
|
||||
#undef snprintf
|
||||
//-------------------------------------------------------------------------
|
||||
// Function
|
||||
//----- snprintf()
|
||||
|
|
@ -107,7 +110,9 @@ int snprintf(char *str, size_t size, const char *fmt, ...) {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
#ifndef ENAC_FLOAT
|
||||
#undef sprintf
|
||||
//----- sprintf()
|
||||
int sprintf(char *str, const char *fmt, ...) {
|
||||
FILE f;
|
||||
|
|
@ -131,6 +136,7 @@ int sprintf(char *str, const char *fmt, ...) {
|
|||
return result;
|
||||
}
|
||||
|
||||
#undef printf
|
||||
//----- printf()
|
||||
int printf(const char *fmt, ...) {
|
||||
#if CHECK_LIBC_INIT
|
||||
|
|
@ -151,6 +157,7 @@ int printf(const char *fmt, ...) {
|
|||
else return 0;
|
||||
}
|
||||
|
||||
#undef vprintf
|
||||
//----- vprintf()
|
||||
int vprintf(const char * fmt, __VALIST param) {
|
||||
#if CHECK_LIBC_INIT
|
||||
|
|
@ -165,11 +172,11 @@ int vprintf(const char * fmt, __VALIST param) {
|
|||
}
|
||||
#endif // ENAC_FLOAT
|
||||
|
||||
#undef vsnprintf
|
||||
//----- vsnprintf()
|
||||
int vsnprintf(char *str, size_t size, const char *fmt, __VALIST param) {
|
||||
int result;
|
||||
int w;
|
||||
int v11;
|
||||
FILE f;
|
||||
#if CHECK_LIBC_INIT
|
||||
if (!libc_has_init) {
|
||||
|
|
@ -199,6 +206,7 @@ int vsnprintf(char *str, size_t size, const char *fmt, __VALIST param) {
|
|||
return result;
|
||||
}
|
||||
|
||||
#undef vfprintf
|
||||
//----- vfprintf()
|
||||
int vfprintf(FILE *fp, const char *fmt0, va_list ap) {
|
||||
#if CHECK_LIBC_INIT
|
||||
|
|
@ -209,86 +217,103 @@ int vfprintf(FILE *fp, const char *fmt0, va_list ap) {
|
|||
return __rtl_vfprintf_r_v1_00(_rtl_impure_ptr, fp, fmt0, ap);
|
||||
}
|
||||
|
||||
#undef memchr
|
||||
//----- memchr()
|
||||
void * memchr(const void * src_void , int c , size_t length) {
|
||||
return __rtl_memchr_v1_00(src_void, c, length);
|
||||
}
|
||||
|
||||
#undef memcmp
|
||||
//----- memcmp()
|
||||
int memcmp(const void *m1, const void *m2, size_t n) {
|
||||
return __rtl_memcmp_v1_00(m1, m2, n);
|
||||
}
|
||||
|
||||
#undef memcpy
|
||||
//----- memcpy()
|
||||
void * memcpy(void *dst0, const void *src0, size_t len0) {
|
||||
return __rtl_memcpy_v1_00(dst0, src0, len0);
|
||||
}
|
||||
|
||||
#undef memmove
|
||||
//----- memmove()
|
||||
void * memmove(void *dst_void, const void *src_void, size_t length) {
|
||||
return __rtl_memmove_v1_00(dst_void, src_void, length);
|
||||
}
|
||||
|
||||
#undef memset
|
||||
//----- memset()
|
||||
void * memset(void *m, int c, size_t n) {
|
||||
return __rtl_memset_v1_00(m, c, n);
|
||||
}
|
||||
|
||||
#undef strcat
|
||||
//----- strcat()
|
||||
char * strcat(char *s1, const char *s2) {
|
||||
return (char *) __rtl_strcat_v1_00(s1, s2);
|
||||
}
|
||||
|
||||
#undef strchr
|
||||
//----- strchr()
|
||||
char * strchr(const char *s1, int i) {
|
||||
return (char *) __rtl_strchr_v1_00(s1, i);
|
||||
}
|
||||
|
||||
#undef strcmp
|
||||
//----- strcmp()
|
||||
int strcmp(const char *s1, const char *s2) {
|
||||
return __rtl_strcmp_v1_00(s1, s2);
|
||||
}
|
||||
|
||||
#undef strcpy
|
||||
//----- strcpy()
|
||||
char * strcpy(char *dst0, const char *src0) {
|
||||
return (char *) __rtl_strcpy_v1_00(dst0, src0);
|
||||
}
|
||||
|
||||
#undef strlen
|
||||
//----- strlen()
|
||||
size_t strlen(const char *str) {
|
||||
return __rtl_strlen_v1_00(str);
|
||||
}
|
||||
|
||||
#undef strncat
|
||||
//----- strncat()
|
||||
char * strncat(char *s1, const char *s2, size_t n) {
|
||||
return (char *) __rtl_strncat_v1_00(s1, s2, n);
|
||||
}
|
||||
|
||||
#undef strncmp
|
||||
//----- strncmp()
|
||||
int strncmp(const char *s1, const char *s2, size_t n) {
|
||||
return __rtl_strncmp_v1_00(s1, s2, n);
|
||||
}
|
||||
|
||||
#undef strncpy
|
||||
//----- strncpy()
|
||||
char * strncpy(char *dst0, const char *src0, size_t count) {
|
||||
return (char *) __rtl_strncpy_v1_00(dst0, src0, count);
|
||||
}
|
||||
|
||||
#undef strstr
|
||||
//----- strstr()
|
||||
char * strstr(const char *searchee, const char *lookfor) {
|
||||
return (char *) __rtl_strstr_v1_00(searchee, lookfor);
|
||||
}
|
||||
|
||||
#undef strsep
|
||||
//----- strsep()
|
||||
char * strsep(char **source_ptr, const char *delim) {
|
||||
return (char *) __rtl_strsep_v1_00(source_ptr, delim);
|
||||
}
|
||||
|
||||
#undef strtok
|
||||
//----- strtok()
|
||||
char * strtok(char *s, const char *delim) {
|
||||
return (char *) __rtl_strtok_v1_00(s, delim);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ROM_ int _vsscanf(const char *buf, const char *fmt, va_list args);
|
||||
#undef sscanf
|
||||
int sscanf(const char *buf, const char *fmt, ...) {
|
||||
va_list args;
|
||||
int i;
|
||||
|
|
@ -300,7 +325,7 @@ int sscanf(const char *buf, const char *fmt, ...) {
|
|||
return i;
|
||||
}
|
||||
|
||||
char toupper(char ch) {
|
||||
int toupper(int ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
};
|
||||
|
||||
|
|
@ -366,7 +391,7 @@ void longjmp(__jmp_buf buf, long value)
|
|||
|
||||
extern __attribute__ ((long_call)) unsigned int Rand(void);
|
||||
|
||||
unsigned int rand(void)
|
||||
int rand(void)
|
||||
{
|
||||
return Rand();
|
||||
}
|
||||
|
|
@ -534,3 +559,8 @@ int __aeabi_fcmpgt(float a, float b)
|
|||
{
|
||||
return __rtl_fcmpgt_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ void __aeabi_memset(void *dest, size_t n, int c); // { memset(dest, c, n); }
|
||||
|
||||
void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }
|
||||
void __aeabi_memclr4(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "basic_types.h"
|
||||
#include "rt_lib_rom.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
|
|
|
|||
|
|
@ -20,25 +20,28 @@ float rtl_sin_f32(float a);
|
|||
// int __rtl_cos_f32_v1_00();
|
||||
// int __rtl_sin_f32_v1_00();
|
||||
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fabsf_v1_00(float a);
|
||||
//----- rtl_fabsf()
|
||||
float rtl_fabsf(float a)
|
||||
{
|
||||
return __rtl_fabsf_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_fabs_v1_00(double a);
|
||||
//----- rtl_fabs()
|
||||
int rtl_fabs(double a)
|
||||
{
|
||||
return __rtl_fabs_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_cos_f32_v1_00(float a);
|
||||
//----- rtl_cos_f32()
|
||||
float rtl_cos_f32(float a)
|
||||
{
|
||||
return __rtl_cos_f32_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_sin_f32_v1_00(float a);
|
||||
//----- rtl_sin_f32()
|
||||
float rtl_sin_f32(float a)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue