mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-26 11:03:05 +00:00
fix warnings
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@363 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -11,7 +11,7 @@ USE_STB_IMAGE = 1
|
|||||||
CC = $(GCC)gcc
|
CC = $(GCC)gcc
|
||||||
CXX = $(GCC)g++
|
CXX = $(GCC)g++
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-unused-value -Wno-sign-compare -Iinclude
|
CFLAGS = -Wall -Wextra -Wno-implicit-fallthrough -Wno-sign-compare -Iinclude
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ oosrc/%.o: oosrc/%.cc
|
|||||||
$(CXX) $(OOL_CXXFLAGS) -fno-exceptions -fno-rtti -c -o $@ $<
|
$(CXX) $(OOL_CXXFLAGS) -fno-exceptions -fno-rtti -c -o $@ $<
|
||||||
|
|
||||||
external/%.o: external/%.c
|
external/%.o: external/%.c
|
||||||
$(CC) $(L_CFLAGS) -c -o $@ $<
|
$(CC) $(L_CFLAGS) -Wno-unused-value -Wno-unused-parameter -c -o $@ $<
|
||||||
|
|
||||||
examples/%.o: examples/%.c
|
examples/%.o: examples/%.c
|
||||||
$(CC) $(E_CFLAGS) -c -o $@ $<
|
$(CC) $(E_CFLAGS) -c -o $@ $<
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ void destroy(MwWidget handle, void* user, void* call) {
|
|||||||
void activate(MwWidget handle, void* user, void* call) {
|
void activate(MwWidget handle, void* user, void* call) {
|
||||||
char msg[256];
|
char msg[256];
|
||||||
MwWidget msgbox;
|
MwWidget msgbox;
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
|
||||||
sprintf(msg, "You pressed: %s", MwListBoxGet(handle, *(int*)call));
|
sprintf(msg, "You pressed: %s", MwListBoxGet(handle, *(int*)call));
|
||||||
|
|
||||||
msgbox = MwMessageBox(wmain, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK);
|
msgbox = MwMessageBox(wmain, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK);
|
||||||
|
|||||||
@@ -9,16 +9,28 @@ void ok(MwWidget handle, void* user, void* call) {
|
|||||||
|
|
||||||
void spawn(MwWidget handle, void* user, void* call) {
|
void spawn(MwWidget handle, void* user, void* call) {
|
||||||
MwWidget mb = MwMessageBox(user, "news has arrived!", "title", MwMB_ICONNEWS | MwMB_BUTTONOK);
|
MwWidget mb = MwMessageBox(user, "news has arrived!", "title", MwMB_ICONNEWS | MwMB_BUTTONOK);
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spawn2(MwWidget handle, void* user, void* call) {
|
void spawn2(MwWidget handle, void* user, void* call) {
|
||||||
MwWidget mb = MwMessageBox(user, "something went wrong!", "title", MwMB_ICONERROR | MwMB_BUTTONOK);
|
MwWidget mb = MwMessageBox(user, "something went wrong!", "title", MwMB_ICONERROR | MwMB_BUTTONOK);
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spawn3(MwWidget handle, void* user, void* call) {
|
void spawn3(MwWidget handle, void* user, void* call) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
for(i = 0; i <= 6; i++) {
|
for(i = 0; i <= 6; i++) {
|
||||||
MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK);
|
MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK);
|
||||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ static void resize(MwWidget handle, void* user, void* call) {
|
|||||||
int w = MwGetInteger(handle, MwNwidth);
|
int w = MwGetInteger(handle, MwNwidth);
|
||||||
int h = MwGetInteger(handle, MwNheight);
|
int h = MwGetInteger(handle, MwNheight);
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwVaApply(vp,
|
MwVaApply(vp,
|
||||||
MwNwidth, w - 10,
|
MwNwidth, w - 10,
|
||||||
MwNheight, h - 10,
|
MwNheight, h - 10,
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ void tick(MwWidget handle, void* user, void* call) {
|
|||||||
int render = 0;
|
int render = 0;
|
||||||
int w = MwGetInteger(opengl, MwNwidth);
|
int w = MwGetInteger(opengl, MwNwidth);
|
||||||
int h = MwGetInteger(opengl, MwNheight);
|
int h = MwGetInteger(opengl, MwNheight);
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)user;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
if(last != t) {
|
if(last != t) {
|
||||||
char* wday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
char* wday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
||||||
char* mon[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
char* mon[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
||||||
@@ -104,6 +109,9 @@ void resize(MwWidget handle, void* user, void* call) {
|
|||||||
int w = MwGetInteger(handle, MwNwidth);
|
int w = MwGetInteger(handle, MwNwidth);
|
||||||
int h = MwGetInteger(handle, MwNheight);
|
int h = MwGetInteger(handle, MwNheight);
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwVaApply(opengl,
|
MwVaApply(opengl,
|
||||||
MwNwidth, w / 5 * 2,
|
MwNwidth, w / 5 * 2,
|
||||||
MwNheight, h,
|
MwNheight, h,
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ static void tick(MwWidget handle, void* user, void* client) {
|
|||||||
static void resize(MwWidget handle, void* user, void* client) {
|
static void resize(MwWidget handle, void* user, void* client) {
|
||||||
int ww, wh;
|
int ww, wh;
|
||||||
|
|
||||||
(void)handle;
|
|
||||||
(void)user;
|
(void)user;
|
||||||
(void)client;
|
(void)client;
|
||||||
|
|
||||||
@@ -39,6 +38,9 @@ static void resize(MwWidget handle, void* user, void* client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void key_pressed(MwWidget handle, void* user, void* client) {
|
static void key_pressed(MwWidget handle, void* user, void* client) {
|
||||||
|
(void)handle;
|
||||||
|
(void)user;
|
||||||
|
|
||||||
key(*(int*)client);
|
key(*(int*)client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ static void tick(MwWidget handle, void* user, void* call) {
|
|||||||
int w = MwGetInteger(opengl, MwNwidth);
|
int w = MwGetInteger(opengl, MwNwidth);
|
||||||
int h = MwGetInteger(opengl, MwNheight);
|
int h = MwGetInteger(opengl, MwNheight);
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)user;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwOpenGLMakeCurrent(opengl);
|
MwOpenGLMakeCurrent(opengl);
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
@@ -49,6 +53,10 @@ static void tick(MwWidget handle, void* user, void* call) {
|
|||||||
|
|
||||||
static void mouse(MwWidget handle, void* user, void* call) {
|
static void mouse(MwWidget handle, void* user, void* call) {
|
||||||
MwLLMouse* mouse = call;
|
MwLLMouse* mouse = call;
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)user;
|
||||||
|
|
||||||
if(mouse->button == MwLLMouseLeft) {
|
if(mouse->button == MwLLMouseLeft) {
|
||||||
t[ct].points[click * 2 + 0] = mouse->point.x;
|
t[ct].points[click * 2 + 0] = mouse->point.x;
|
||||||
t[ct].points[click * 2 + 1] = mouse->point.y;
|
t[ct].points[click * 2 + 1] = mouse->point.y;
|
||||||
@@ -86,8 +94,13 @@ static void mouse(MwWidget handle, void* user, void* call) {
|
|||||||
|
|
||||||
static void mouse_move(MwWidget handle, void* user, void* call) {
|
static void mouse_move(MwWidget handle, void* user, void* call) {
|
||||||
MwPoint* point = call;
|
MwPoint* point = call;
|
||||||
|
|
||||||
|
(void)handle;
|
||||||
|
(void)user;
|
||||||
|
|
||||||
mx = point->x;
|
mx = point->x;
|
||||||
my = point->y;
|
my = point->y;
|
||||||
|
|
||||||
if(click == 2) {
|
if(click == 2) {
|
||||||
t[ct].points[2 * 2 + 0] = point->x;
|
t[ct].points[2 * 2 + 0] = point->x;
|
||||||
t[ct].points[2 * 2 + 1] = point->y;
|
t[ct].points[2 * 2 + 1] = point->y;
|
||||||
|
|||||||
@@ -14,12 +14,19 @@ static int get_first_entry(MwListBox lb) {
|
|||||||
|
|
||||||
static void vscroll_changed(MwWidget handle, void* user, void* call) {
|
static void vscroll_changed(MwWidget handle, void* user, void* call) {
|
||||||
MwListBox lb = handle->parent->internal;
|
MwListBox lb = handle->parent->internal;
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
(void)call;
|
||||||
|
|
||||||
MwForceRender(lb->frame);
|
MwForceRender(lb->frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void frame_mouse_down(MwWidget handle, void* user, void* call) {
|
static void frame_mouse_down(MwWidget handle, void* user, void* call) {
|
||||||
MwListBox lb = handle->parent->internal;
|
MwListBox lb = handle->parent->internal;
|
||||||
MwLLMouse* m = call;
|
MwLLMouse* m = call;
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
|
||||||
if(m->button == MwLLMouseLeft) {
|
if(m->button == MwLLMouseLeft) {
|
||||||
int st = 0;
|
int st = 0;
|
||||||
int i;
|
int i;
|
||||||
@@ -47,6 +54,9 @@ static void frame_mouse_down(MwWidget handle, void* user, void* call) {
|
|||||||
static void frame_mouse_up(MwWidget handle, void* user, void* call) {
|
static void frame_mouse_up(MwWidget handle, void* user, void* call) {
|
||||||
MwListBox lb = handle->parent->internal;
|
MwListBox lb = handle->parent->internal;
|
||||||
MwLLMouse* m = call;
|
MwLLMouse* m = call;
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
|
||||||
if(m->button == MwLLMouseLeft) {
|
if(m->button == MwLLMouseLeft) {
|
||||||
lb->pressed = 0;
|
lb->pressed = 0;
|
||||||
}
|
}
|
||||||
@@ -55,6 +65,9 @@ static void frame_mouse_up(MwWidget handle, void* user, void* call) {
|
|||||||
static void frame_mouse_move(MwWidget handle, void* user, void* call) {
|
static void frame_mouse_move(MwWidget handle, void* user, void* call) {
|
||||||
MwListBox lb = handle->parent->internal;
|
MwListBox lb = handle->parent->internal;
|
||||||
MwPoint* p = call;
|
MwPoint* p = call;
|
||||||
|
|
||||||
|
(void)user;
|
||||||
|
|
||||||
if(lb->pressed) {
|
if(lb->pressed) {
|
||||||
int st = 0;
|
int st = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user