free(li->text);
li->text = strdup(text);
- if (strlen(text) + 4 > co->width)
+ if (strlen(text) + 4 > (unsigned int)co->width)
co->width = strlen(text) + 4;
}
} else
itemInfo[numItems].text = "";
- if (strlen(itemInfo[numItems].text) > maxTextWidth)
+ if (strlen(itemInfo[numItems].text) > (unsigned int)maxTextWidth)
maxTextWidth = strlen(itemInfo[numItems].text);
- if (strlen(itemInfo[numItems].tag) > maxTagWidth)
+ if (strlen(itemInfo[numItems].tag) > (unsigned int)maxTagWidth)
maxTagWidth = strlen(itemInfo[numItems].tag);
numItems++;
else
cbStates[numBoxes] = ' ';
- if (strlen(cbInfo[numBoxes].tag) > maxWidth)
+ if (strlen(cbInfo[numBoxes].tag) > (unsigned int)maxWidth)
maxWidth = strlen(cbInfo[numBoxes].tag);
numBoxes++;
void newtEntrySet(newtComponent co, char * value, int cursorAtEnd) {
struct entry * en = co->data;
- if ((strlen(value) + 1) > en->bufAlloced) {
+ if ((strlen(value) + 1) > (unsigned int)en->bufAlloced) {
free(en->buf);
en->bufAlloced = strlen(value) + 1;
en->buf = malloc(en->bufAlloced);
else
co->takesFocus = 0;
- if (initialValue && strlen(initialValue) > width) {
+ if (initialValue && strlen(initialValue) > (unsigned int)width) {
en->bufAlloced = strlen(initialValue) + 1;
}
en->buf = malloc(en->bufAlloced);
int newtListboxDeleteEntry(newtComponent co, int num) {
struct listbox * li = co->data;
int i, widest = 0, t;
- struct items *item, *item2;
+ struct items *item, *item2 = NULL;
if(num > li->numItems)
num = li->numItems;
newtResume();
}
-void main(void) {
+int main(void) {
newtComponent b1, b2, r1, r2, r3, e2, e3, l1, l2, l3, scale;
newtComponent lb, t, rsf, answer;
newtComponent cs[10];
for(i = 0; i < numsel; i++)
puts(selectedList[i]);
}
+
+ return 0;
}