1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

eLua - fix wrong # arguments, add type casts, add const attribs

This commit is contained in:
ecdr 2013-10-27 15:30:57 -08:00
parent 9f81cca6b8
commit 57fccdebbb
3 changed files with 6 additions and 6 deletions

View File

@ -79,8 +79,8 @@ int adc_setup_channel( unsigned id, u8 logcount )
#if defined( BUF_ENABLE_ADC )
int res;
old_status = platform_cpu_get_global_interrupts( PLATFORM_CPU_DISABLE );
if( ( (u16) 1 << logcount ) != buf_get_size( BUF_ID_ADC, id ) )
old_status = platform_cpu_get_global_interrupts( ); // Had argument PLATFORM_CPU_DISABLE, but the prototype does not list an argument, and none of the
if( ((unsigned) ( (u16) 1 << logcount )) != buf_get_size( BUF_ID_ADC, id ) )
{
res = buf_set( BUF_ID_ADC, id, logcount, BUF_DSIZE_U16 );
if ( res != PLATFORM_OK )

View File

@ -884,7 +884,7 @@ typedef long int32_t;
#define LUA_META_ROTABLES
#endif
#if LUA_OPTIMIZE_MEMORY == 2 && LUA_USE_POPEN
#if LUA_OPTIMIZE_MEMORY == 2 && defined(LUA_USE_POPEN)
#error "Pipes not supported in aggresive optimization mode (LUA_OPTIMIZE_MEMORY=2)"
#endif

View File

@ -25,7 +25,7 @@
// Define here your autorun/boot files,
// in the order you want eLua to search for them
char *boot_order[] = {
const char *boot_order[] = {
#if defined(BUILD_MMCFS)
"/mmc/autorun.lua",
"/mmc/autorun.lc",
@ -96,7 +96,7 @@ int main( void )
if( ( fp = fopen( boot_order[ i ], "r" ) ) != NULL )
{
fclose( fp );
char* lua_argv[] = { "lua", boot_order[i], NULL };
char* lua_argv[] = { (char *)"lua", (char *)boot_order[i], NULL };
lua_main( 2, lua_argv );
break; // autoruns only the first found
}
@ -110,7 +110,7 @@ int main( void )
if( shell_init() == 0 )
{
// Start Lua directly
char* lua_argv[] = { "lua", NULL };
char* lua_argv[] = { (char *)"lua", NULL };
lua_main( 1, lua_argv );
}
else