summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-03-30 00:51:34 +0100
committerMatthias Melcher <github@matthiasm.com>2025-03-30 00:51:34 +0100
commit0eb6bb8e6d34b39399cda8b768851a3218eb7e2c (patch)
treedfd571e3a7806cc834e6a33fa89b3878d6daffb7 /test
parentbd9d1bc03809586d81a547a7a8acce903482910b (diff)
Fixing a few more compiler warnings.
Diffstat (limited to 'test')
-rw-r--r--test/fractals.cxx2
-rw-r--r--test/terminal.fl10
2 files changed, 6 insertions, 6 deletions
diff --git a/test/fractals.cxx b/test/fractals.cxx
index d9cf9905f..5e3839d03 100644
--- a/test/fractals.cxx
+++ b/test/fractals.cxx
@@ -70,7 +70,7 @@ int main(int, char**) {
# define srand48(x) (srand((x)))
#elif defined __APPLE__
# define drand48() (((float) rand())/((float) RAND_MAX))
-# define srand48(x) (srand((x)))
+# define srand48(x) (srand((int)(x)))
#endif
typedef enum { NOTALLOWED, MOUNTAIN, TREE, ISLAND, BIGMTN, STEM, LEAF,
diff --git a/test/terminal.fl b/test/terminal.fl
index b2c0d4d1f..3c9186b68 100644
--- a/test/terminal.fl
+++ b/test/terminal.fl
@@ -452,8 +452,7 @@ const char *test[] = {
};
if (reset) { index = 0; return 0; }
-return show_test(test, index);} {selected
- }
+return show_test(test, index);} {}
}
Function {test_esc_rgbcolors(bool reset)} {
comment {--- 0020: Test RGB Colors} return_type {static int}
@@ -1373,7 +1372,7 @@ for ( int t=0; t<count; t++ )
}
Function {do_command(const char *cmd)} {
comment {Run the command, output appends to terminal
-} return_type void
+} open return_type void
} {
code {// Run command in pipe, return output to tty
// TODO: This should probably be reimplemented as a thread.
@@ -1420,13 +1419,14 @@ while (1) {
Fl::wait(0.05);
SSIZE_T bytes = READ(fd, s, sizeof(s)); // shout in uppercase so windows can hear us
if (bytes == -1 && errno == EAGAIN) continue; // no data yet
- else if (bytes > 0) G_tty->append(s, bytes); // write block to terminal, handles utf8
+ else if (bytes > 0) G_tty->append(s, (int)bytes); // write block to terminal, handles utf8
else break; // pipe closed
}
PCLOSE(fp);
G_tty->append_ascii("\\033[33;2m<<END_OF_OUTPUT>>\\033[0m\\n");
-G_tty->redraw();} {}
+G_tty->redraw();} {selected
+ }
}
decl {////// GUI LAYOUT //////} {private local
}