diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-04-11 07:35:33 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-04-11 07:35:33 +0000 |
| commit | e72630762df5d3dfb34bf0866b7d908c93108bff (patch) | |
| tree | 1a26152243e0f59ef329cea4bb89fa97e6bb72de /test | |
| parent | e9a3f0e927853890a424f8f46273dc010f3980e3 (diff) | |
Remove all warnings for Mac buidl with gcc (except one)
- some warnings about using char for indexing
- some warnings about using signed int in strncmp
- some warnings about deprecated fl_ask (replaced with fl_choice)
The on warning not removed is the strftime("%c") in fluid since
I don't know anything about PS and I don't know if a different
data format would break PS. Mike?
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/ask.cxx | 2 | ||||
| -rw-r--r-- | test/checkers.cxx | 4 | ||||
| -rw-r--r-- | test/demo.cxx | 2 | ||||
| -rw-r--r-- | test/glpuzzle.cxx | 6 | ||||
| -rw-r--r-- | test/message.cxx | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/test/ask.cxx b/test/ask.cxx index ac1358e93..86ce59435 100644 --- a/test/ask.cxx +++ b/test/ask.cxx @@ -51,7 +51,7 @@ void rename_me(Fl_Widget*o) { } void window_callback(Fl_Widget*, void*) { - if (!fl_ask("Are you sure you want to quit?")) return; + if (!fl_choice("Are you sure you want to quit?", "Cancel", "Quit", 0L)) return; exit(0); } diff --git a/test/checkers.cxx b/test/checkers.cxx index 720a109d5..83eb1b7f2 100644 --- a/test/checkers.cxx +++ b/test/checkers.cxx @@ -221,7 +221,7 @@ void evaluateboard(node *n,int print) { if (!n->who) tb = b; // move was black's else { - for (int i=0; i<45; i++) flipboard[44-i] = flip[b[i]]; + for (int i=0; i<45; i++) flipboard[44-i] = flip[(int)b[i]]; tb = flipboard; } @@ -413,7 +413,7 @@ void movepiece(node* f, int i, node* jnode) { static char jumphappened; for (int k=0; k<4; k++) { - int direction = offset[b[i]][k]; + int direction = offset[(int)b[i]][k]; if (!direction) break; int j = i+direction; if (b[j] == EMPTY) { diff --git a/test/demo.cxx b/test/demo.cxx index a907c2414..87e0ac88c 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -158,7 +158,7 @@ int numb2but(int inumb, int maxnumb) /* Pushing and Popping menus */ char stack[64][32]; -char stsize = 0; +int stsize = 0; void push_menu(const char* nnn) /* Pushes a menu to be visible */ diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx index ea73dd67d..94bba7997 100644 --- a/test/glpuzzle.cxx +++ b/test/glpuzzle.cxx @@ -154,7 +154,7 @@ hash(Config config) value = 0; for (i = 0; i < HEIGHT; i++) { for (j = 0; j < WIDTH; j++) { - value = value + convert[config[i][j]]; + value = value + convert[(int)config[i][j]]; value *= 6; } } @@ -521,8 +521,8 @@ addConfig(Config config, struct puzzle *back) for (i = 0; i < WIDTH; i++) { for (j = 0; j < HEIGHT; j++) { - if (convert[config[j][i]] != - convert[newpiece->pieces[j][i]]) + if (convert[(int)config[j][i]] != + convert[(int)newpiece->pieces[j][i]]) goto nomatch; } } diff --git a/test/message.cxx b/test/message.cxx index 4f0c51a2f..4d2329b32 100644 --- a/test/message.cxx +++ b/test/message.cxx @@ -37,8 +37,8 @@ int main(int, char **) { fl_alert("Quantum fluctuations in the space-time continuum detected, " "you have %g seconds to comply.", 10.0); - printf("fl_ask returned %d\n", - fl_ask("Do you really want to %s?", "continue")); + printf("fl_choice returned %d\n", + fl_choice("Do you really want to %s?", "No", "Yes", 0L, "continue")); printf("fl_choice returned %d\n", fl_choice("Choose one of the following:","choice0","choice1","choice2")); |
