summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/newt
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-07-03 18:38:05 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-07-03 18:38:05 +0000
commit1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1 (patch)
tree54c7b6b4bbaf2e493e773f9e48d7eb459f60f197 /mdk-stage1/newt
parenta3fd355593f7ab9ae5c6d57ec69ef3f5a2f8cb9a (diff)
downloaddrakx-1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1.tar
drakx-1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1.tar.gz
drakx-1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1.tar.bz2
drakx-1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1.tar.xz
drakx-1cdb4f411c123a1f7402c9efbe46b3b05c3d94a1.zip
compile with -W
Diffstat (limited to 'mdk-stage1/newt')
-rw-r--r--mdk-stage1/newt/checkboxtree.c4
-rw-r--r--mdk-stage1/newt/entry.c2
-rw-r--r--mdk-stage1/newt/grid.c2
-rw-r--r--mdk-stage1/newt/listbox.c6
-rw-r--r--mdk-stage1/newt/newt.c6
-rw-r--r--mdk-stage1/newt/textbox.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/mdk-stage1/newt/checkboxtree.c b/mdk-stage1/newt/checkboxtree.c
index b56bd1e9f..00113f23e 100644
--- a/mdk-stage1/newt/checkboxtree.c
+++ b/mdk-stage1/newt/checkboxtree.c
@@ -233,7 +233,7 @@ int newtCheckboxTreeAddArray(newtComponent co,
i = 4 + (3 * item->depth);
- if ((strlen(text) + i + ct->pad) > co->width) {
+ if ((strlen(text) + i + ct->pad) > (size_t)co->width) {
co->width = strlen(text) + i + ct->pad;
}
@@ -669,7 +669,7 @@ void newtCheckboxTreeSetEntry(newtComponent co, const void * data, const char *
i = 4 + (3 * item->depth);
- if ((strlen(text) + i + ct->pad) > co->width) {
+ if ((strlen(text) + i + ct->pad) > (size_t)co->width) {
co->width = strlen(text) + i + ct->pad;
}
diff --git a/mdk-stage1/newt/entry.c b/mdk-stage1/newt/entry.c
index 154edba71..1b33f1c6f 100644
--- a/mdk-stage1/newt/entry.c
+++ b/mdk-stage1/newt/entry.c
@@ -228,7 +228,7 @@ static struct eventResult entryEvent(newtComponent co,
case EV_MOUSE:
if ((ev.u.mouse.type == MOUSE_BUTTON_DOWN) &&
(en->flags ^ NEWT_FLAG_HIDDEN)) {
- if (strlen(en->buf) >= ev.u.mouse.x - co->left) {
+ if (strlen(en->buf) >= (size_t) (ev.u.mouse.x - co->left)) {
en->cursorPosition = ev.u.mouse.x - co->left;
newtGotorc(co->top,
co->left +(en->cursorPosition - en->firstChar));
diff --git a/mdk-stage1/newt/grid.c b/mdk-stage1/newt/grid.c
index 433011396..37d2b2e74 100644
--- a/mdk-stage1/newt/grid.c
+++ b/mdk-stage1/newt/grid.c
@@ -244,7 +244,7 @@ void newtGridWrappedWindow(newtGrid grid, char * title) {
int width, height, offset = 0;
newtGridGetSize(grid, &width, &height);
- if (width < strlen(title) + 2) {
+ if ((size_t)width < strlen(title) + 2) {
offset = ((strlen(title) + 2) - width) / 2;
width = strlen(title) + 2;
}
diff --git a/mdk-stage1/newt/listbox.c b/mdk-stage1/newt/listbox.c
index ef276aeb4..cdbf792ca 100644
--- a/mdk-stage1/newt/listbox.c
+++ b/mdk-stage1/newt/listbox.c
@@ -297,7 +297,7 @@ void newtListboxSetEntry(newtComponent co, int num, const char * text) {
free(item->text);
item->text = strdup(text);
}
- if (li->userHasSetWidth == 0 && strlen(text) > li->curWidth) {
+ if (li->userHasSetWidth == 0 && strlen(text) > (size_t)li->curWidth) {
updateWidth(co, li, strlen(text));
}
@@ -329,7 +329,7 @@ int newtListboxAppendEntry(newtComponent co, const char * text,
item = li->boxItems = malloc(sizeof(struct items));
}
- if (!li->userHasSetWidth && text && (strlen(text) > li->curWidth))
+ if (!li->userHasSetWidth && text && (strlen(text) > (size_t)li->curWidth))
updateWidth(co, li, strlen(text));
item->text = strdup(text); item->data = data; item->next = NULL;
@@ -369,7 +369,7 @@ int newtListboxInsertEntry(newtComponent co, const char * text,
item->next = NULL;
}
- if (!li->userHasSetWidth && text && (strlen(text) > li->curWidth))
+ if (!li->userHasSetWidth && text && (strlen(text) > (size_t)li->curWidth))
updateWidth(co, li, strlen(text));
item->text = strdup(text?text:"(null)"); item->data = data;
diff --git a/mdk-stage1/newt/newt.c b/mdk-stage1/newt/newt.c
index 1cfe3ac93..d6cb3cd96 100644
--- a/mdk-stage1/newt/newt.c
+++ b/mdk-stage1/newt/newt.c
@@ -129,7 +129,7 @@ void newtSetSuspendCallback(newtSuspendCallback cb, void * data) {
suspendCallbackData = data;
}
-static void handleSigwinch(int signum) {
+static void handleSigwinch(int signum __attribute__ ((unused))) {
needResize = 1;
}
@@ -561,8 +561,8 @@ void newtDelay(int usecs) {
select(0, &set, &set, &set, &tv);
}
-struct eventResult newtDefaultEventHandler(newtComponent c,
- struct event ev) {
+struct eventResult newtDefaultEventHandler(newtComponent c __attribute__ ((unused)),
+ struct event ev __attribute__ ((unused))) {
struct eventResult er;
er.result = ER_IGNORED;
diff --git a/mdk-stage1/newt/textbox.c b/mdk-stage1/newt/textbox.c
index 2f2880fe2..8eb4ae4db 100644
--- a/mdk-stage1/newt/textbox.c
+++ b/mdk-stage1/newt/textbox.c
@@ -64,7 +64,7 @@ int newtTextboxGetNumLines(newtComponent co) {
}
newtComponent newtTextboxReflowed(int left, int top, char * text, int width,
- int flexDown, int flexUp, int flags) {
+ int flexDown, int flexUp, int flags __attribute__ ((unused))) {
newtComponent co;
char * reflowedText;
int actWidth, actHeight;