Fix one compiler warning and one error on Windows 64-bit.
These warnings and errors were found using gcc 6.1 (64-bit) under Windows. The error in examples/howto-add_fd-and-popen.cxx (-fpermissive) is due to the wrong definition of Fl_FD_Handler under Windows 64-bit (FL_SOCKET!). This should really be fixed in a better way in FLTK 1.4. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ff214db67a
commit
633d7c2c5f
@ -44,7 +44,9 @@
|
||||
FILE *G_fp = NULL;
|
||||
|
||||
// Handler for add_fd() -- called whenever the ping command outputs a new line of data
|
||||
void HandleFD(int fd, void *data) {
|
||||
// Note: FL_SOCKET as 1st argument is used to fix a compiler error(!) on Windows 64-bit.
|
||||
// Unfortunately we need this in FLTK 1.3 - should hopefully be fixed in 1.4 with a better solution.
|
||||
void HandleFD(FL_SOCKET fd, void *data) {
|
||||
Fl_Multi_Browser *brow = (Fl_Multi_Browser*)data;
|
||||
char s[1024];
|
||||
if ( fgets(s, 1023, G_fp) == NULL ) { // read the line of data
|
||||
|
@ -29,7 +29,7 @@ Fl_Tree *G_tree = 0;
|
||||
|
||||
// Resort the tree
|
||||
void MySortCallback(Fl_Widget*, void *data) {
|
||||
int dir = int(long(data)); // forward or reverse
|
||||
int dir = int(fl_intptr_t(data)); // forward or reverse
|
||||
Fl_Tree_Item *i = G_tree->root();
|
||||
// Bubble sort
|
||||
for ( int ax=0; ax<i->children(); ax++ ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user