tinypy: clean warnings

git-svn-id: svn://kolibrios.org@8474 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
maxcodehack 2020-12-25 11:17:03 +00:00
parent 931a0ac397
commit 4930c1d7a2
6 changed files with 40 additions and 34 deletions

View File

@ -8,7 +8,7 @@ extern tp_obj tp_string(char const *v);
extern tp_obj tp_list(TP); extern tp_obj tp_list(TP);
extern tp_obj tp_dict(TP); extern tp_obj tp_dict(TP);
extern void _tp_raise(TP,tp_obj); extern void _tp_raise(TP,tp_obj);
#define _cdecl __attribute__((cdecl)) // #define _cdecl __attribute__((cdecl))
extern int (* _cdecl con_printf)(const char* format,...); extern int (* _cdecl con_printf)(const char* format,...);
#define call70(par, st) asm volatile ("int $0x40":"=a"(st):"a"(70), "b"(par)) #define call70(par, st) asm volatile ("int $0x40":"=a"(st):"a"(70), "b"(par))

View File

@ -5,12 +5,12 @@ LD = kos32-ld
SDK_DIR:= $(abspath ../../../../contrib/sdk) SDK_DIR:= $(abspath ../../../../contrib/sdk)
LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds \ LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds \
--image-base 0 -lgcc -ldll -lc.dll --image-base 0 -lgcc -lc.dll
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -mpreferred-stack-boundary=2 \ CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -mpreferred-stack-boundary=2 \
-mincoming-stack-boundary=2 -fno-builtin -fno-common -mincoming-stack-boundary=2 -fno-builtin -fno-common
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(CLAYER)/INCLUDE INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include
LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
@ -30,4 +30,4 @@ kolibri_dbg.obj: fasm_modules/kolibri_dbg.s
cp fasm_modules/kolibri_dbg.obj . cp fasm_modules/kolibri_dbg.obj .
clean: clean:
-rm -f *.o $(NAME).map fasm_modules/kolibri_dbg.obj kolibri_dbg.obj -rm -f *.o $(NAME).map fasm_modules/kolibri_dbg.obj kolibri_dbg.obj

View File

@ -1,9 +1,9 @@
#include "kolibri.h" #include "kolibri.h"
/*
#define __stdcall __attribute__((stdcall)) #define __stdcall __attribute__((stdcall))
#define _cdecl __attribute__((cdecl)) #define _cdecl __attribute__((cdecl))
#define _stdcall __attribute__((stdcall)) #define _stdcall __attribute__((stdcall))
*/
void (* _stdcall con_init)(unsigned w_w, unsigned w_h, unsigned s_w, unsigned s_h, const char* t); void (* _stdcall con_init)(unsigned w_w, unsigned w_h, unsigned s_w, unsigned s_h, const char* t);
int (* _cdecl con_printf)(const char* format,...); int (* _cdecl con_printf)(const char* format,...);
void (* _stdcall con_exit)(char bCloseWindow); void (* _stdcall con_exit)(char bCloseWindow);

View File

@ -1,39 +1,45 @@
#ifndef NULL
#define NULL ((void*)0) #define NULL ((void*)0)
#endif
#pragma pack(push,1)
typedef struct typedef struct
{ {
unsigned p00 __attribute__((packed)); unsigned p00;
unsigned p04 __attribute__((packed)); unsigned p04;
unsigned p08 __attribute__((packed)); char *p08;
unsigned p12 __attribute__((packed)); unsigned p12;
unsigned p16 __attribute__((packed)); unsigned p16;
char p20 __attribute__((packed)); char p20;
char *p21 __attribute__((packed)); char *p21;
} kol_struct70 __attribute__((packed)); } kol_struct70;
#pragma pack(pop)
#pragma pack(push,1)
typedef struct typedef struct
{ {
unsigned p00 __attribute__((packed)); unsigned p00;
char p04 __attribute__((packed)); char p04;
char p05[3] __attribute__((packed)); char p05[3];
unsigned p08 __attribute__((packed)); unsigned p08;
unsigned p12 __attribute__((packed)); unsigned p12;
unsigned p16 __attribute__((packed)); unsigned p16;
unsigned p20 __attribute__((packed)); unsigned p20;
unsigned p24 __attribute__((packed)); unsigned p24;
unsigned p28 __attribute__((packed)); unsigned p28;
unsigned p32[2] __attribute__((packed)); unsigned long long p32;
unsigned p40 __attribute__((packed)); unsigned p40;
} kol_struct_BDVK __attribute__((packed)); } kol_struct_BDVK;
#pragma pack(pop)
#pragma pack(push,1)
typedef struct typedef struct
{ {
char *name __attribute__((packed)); char *name;
void *data __attribute__((packed)); void *data;
} kol_struct_import __attribute__((packed)); } kol_struct_import;
#pragma pack(pop)
void kol_exit(); void kol_exit();
void kol_sleep(unsigned d); void kol_sleep(unsigned d);
@ -89,4 +95,4 @@ unsigned kol_sound_speaker(char data[]);
unsigned kol_process_info(unsigned slot, char buf1k[]); unsigned kol_process_info(unsigned slot, char buf1k[]);
int kol_process_kill_pid(unsigned process); int kol_process_kill_pid(unsigned process);
void kol_get_kernel_ver(char buff16b[]); void kol_get_kernel_ver(char buff16b[]);
int kol_kill_process(unsigned process); int kol_kill_process(unsigned process);

View File

@ -14,7 +14,7 @@ extern tp_obj tp_call(TP, const char *mod, const char *fnc, tp_obj params);
extern void _tp_call(TP,tp_obj *dest, tp_obj fnc, tp_obj params); extern void _tp_call(TP,tp_obj *dest, tp_obj fnc, tp_obj params);
extern int tp_bool(TP,tp_obj v); extern int tp_bool(TP,tp_obj v);
extern tp_obj tp_has(TP,tp_obj self, tp_obj k); extern tp_obj tp_has(TP,tp_obj self, tp_obj k);
#define _cdecl __attribute__((cdecl)) // #define _cdecl __attribute__((cdecl))
extern int (* _cdecl con_printf)(const char* format,...); extern int (* _cdecl con_printf)(const char* format,...);
static tp_obj kolibri_show(TP) static tp_obj kolibri_show(TP)
{ {

View File

@ -8,7 +8,7 @@ extern tp_obj tp_method(TP,tp_obj self,tp_obj v(TP));
extern tp_obj tp_fnc(TP,tp_obj v(TP)); extern tp_obj tp_fnc(TP,tp_obj v(TP));
extern tp_obj tp_get(TP,tp_obj self, tp_obj k); extern tp_obj tp_get(TP,tp_obj self, tp_obj k);
tp_obj tp_has(TP,tp_obj self, tp_obj k); tp_obj tp_has(TP,tp_obj self, tp_obj k);
#define _cdecl __attribute__((cdecl)) // #define _cdecl __attribute__((cdecl))
extern int (* _cdecl con_printf)(const char* format,...); extern int (* _cdecl con_printf)(const char* format,...);
#define PRECISION 0.000001 #define PRECISION 0.000001