Fix more Windows 64-bit g++ compiler warnings.

Fixed warnings:

  42 cast to pointer from integer of different size [-Wint-to-pointer-cast]


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2016-07-29 10:54:22 +00:00
parent 17b9f6d6cb
commit 524fb8ae27
3 changed files with 68 additions and 68 deletions

View File

@ -1132,23 +1132,23 @@ static Fl_Button* relative(Fl_Widget* o, int i) {
}
static Fl_Menu_Item alignmenu[] = {
{"FL_ALIGN_CENTER",0,0,(void*)(FL_ALIGN_CENTER)},
{"FL_ALIGN_TOP",0,0,(void*)(FL_ALIGN_TOP)},
{"FL_ALIGN_BOTTOM",0,0,(void*)(FL_ALIGN_BOTTOM)},
{"FL_ALIGN_LEFT",0,0,(void*)(FL_ALIGN_LEFT)},
{"FL_ALIGN_RIGHT",0,0,(void*)(FL_ALIGN_RIGHT)},
{"FL_ALIGN_INSIDE",0,0,(void*)(FL_ALIGN_INSIDE)},
{"FL_ALIGN_CLIP",0,0,(void*)(FL_ALIGN_CLIP)},
{"FL_ALIGN_WRAP",0,0,(void*)(FL_ALIGN_WRAP)},
{"FL_ALIGN_TEXT_OVER_IMAGE",0,0,(void*)(FL_ALIGN_TEXT_OVER_IMAGE)},
{"FL_ALIGN_TOP_LEFT",0,0,(void*)(FL_ALIGN_TOP_LEFT)},
{"FL_ALIGN_TOP_RIGHT",0,0,(void*)(FL_ALIGN_TOP_RIGHT)},
{"FL_ALIGN_BOTTOM_LEFT",0,0,(void*)(FL_ALIGN_BOTTOM_LEFT)},
{"FL_ALIGN_BOTTOM_RIGHT",0,0,(void*)(FL_ALIGN_BOTTOM_RIGHT)},
{"FL_ALIGN_LEFT_TOP",0,0,(void*)(FL_ALIGN_LEFT_TOP)},
{"FL_ALIGN_RIGHT_TOP",0,0,(void*)(FL_ALIGN_RIGHT_TOP)},
{"FL_ALIGN_LEFT_BOTTOM",0,0,(void*)(FL_ALIGN_LEFT_BOTTOM)},
{"FL_ALIGN_RIGHT_BOTTOM",0,0,(void*)(FL_ALIGN_RIGHT_BOTTOM)},
{"FL_ALIGN_CENTER",0,0,(void*)(fl_intptr_t)(FL_ALIGN_CENTER)},
{"FL_ALIGN_TOP",0,0,(void*)(fl_intptr_t)(FL_ALIGN_TOP)},
{"FL_ALIGN_BOTTOM",0,0,(void*)(fl_intptr_t)(FL_ALIGN_BOTTOM)},
{"FL_ALIGN_LEFT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_LEFT)},
{"FL_ALIGN_RIGHT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_RIGHT)},
{"FL_ALIGN_INSIDE",0,0,(void*)(fl_intptr_t)(FL_ALIGN_INSIDE)},
{"FL_ALIGN_CLIP",0,0,(void*)(fl_intptr_t)(FL_ALIGN_CLIP)},
{"FL_ALIGN_WRAP",0,0,(void*)(fl_intptr_t)(FL_ALIGN_WRAP)},
{"FL_ALIGN_TEXT_OVER_IMAGE",0,0,(void*)(fl_intptr_t)(FL_ALIGN_TEXT_OVER_IMAGE)},
{"FL_ALIGN_TOP_LEFT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_TOP_LEFT)},
{"FL_ALIGN_TOP_RIGHT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_TOP_RIGHT)},
{"FL_ALIGN_BOTTOM_LEFT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_BOTTOM_LEFT)},
{"FL_ALIGN_BOTTOM_RIGHT",0,0,(void*)(fl_intptr_t)(FL_ALIGN_BOTTOM_RIGHT)},
{"FL_ALIGN_LEFT_TOP",0,0,(void*)(fl_intptr_t)(FL_ALIGN_LEFT_TOP)},
{"FL_ALIGN_RIGHT_TOP",0,0,(void*)(fl_intptr_t)(FL_ALIGN_RIGHT_TOP)},
{"FL_ALIGN_LEFT_BOTTOM",0,0,(void*)(fl_intptr_t)(FL_ALIGN_LEFT_BOTTOM)},
{"FL_ALIGN_RIGHT_BOTTOM",0,0,(void*)(fl_intptr_t)(FL_ALIGN_RIGHT_BOTTOM)},
{0}};
void align_cb(Fl_Button* i, void *v) {

View File

@ -27,30 +27,30 @@ static void cb_(Fl_Tabs* o, void* v) {
Fl_Menu_Item menu_[] = {
{" Image Alignment ", 0, 0, (void*)(0xFFFFFFFF), 1, (uchar)FL_NORMAL_LABEL, 2, 11, 0},
{"image over text", 0, 0, (void*)(FL_ALIGN_IMAGE_OVER_TEXT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"text over image", 0, 0, (void*)(FL_ALIGN_TEXT_OVER_IMAGE), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"text next to image", 0, 0, (void*)(FL_ALIGN_TEXT_NEXT_TO_IMAGE), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"image next to text", 0, 0, (void*)(FL_ALIGN_IMAGE_NEXT_TO_TEXT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"image is backdrop", 0, 0, (void*)(FL_ALIGN_IMAGE_BACKDROP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"image over text", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_IMAGE_OVER_TEXT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"text over image", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_TEXT_OVER_IMAGE), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"text next to image", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_TEXT_NEXT_TO_IMAGE), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"image next to text", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_IMAGE_NEXT_TO_TEXT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"image is backdrop", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_IMAGE_BACKDROP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Menu_Item menu_1[] = {
{" Inside && Outside ", 0, 0, (void*)(0xFFFFFFFF), 1, (uchar)FL_NORMAL_LABEL, 2, 11, 0},
{"top left", 0, 0, (void*)(FL_ALIGN_TOP_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"top", 0, 0, (void*)(FL_ALIGN_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"top right", 0, 0, (void*)(FL_ALIGN_TOP_RIGHT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"left", 0, 0, (void*)(FL_ALIGN_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"center", 0, 0, (void*)(FL_ALIGN_CENTER), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right", 0, 0, (void*)(FL_ALIGN_RIGHT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom left", 0, 0, (void*)(FL_ALIGN_BOTTOM_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom", 0, 0, (void*)(FL_ALIGN_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom right", 0, 0, (void*)(FL_ALIGN_BOTTOM_RIGHT), 128, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"top left", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_TOP_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"top", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"top right", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_TOP_RIGHT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"left", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"center", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_CENTER), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_RIGHT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom left", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_BOTTOM_LEFT), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"bottom right", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_BOTTOM_RIGHT), 128, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{" Outside Alignment ", 0, 0, (void*)(0xFFFFFFFF), 1, (uchar)FL_NORMAL_LABEL, 2, 11, 0},
{"left top", 0, 0, (void*)(FL_ALIGN_LEFT_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right top", 0, 0, (void*)(FL_ALIGN_RIGHT_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"left bottom", 0, 0, (void*)(FL_ALIGN_LEFT_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right bottom", 0, 0, (void*)(FL_ALIGN_RIGHT_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"left top", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_LEFT_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right top", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_RIGHT_TOP), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"left bottom", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_LEFT_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"right bottom", 0, 0, (void*)((fl_intptr_t)FL_ALIGN_RIGHT_BOTTOM), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{0,0,0,0,0,0,0,0,0}
};
@ -185,7 +185,7 @@ Fl_Double_Window* make_widget_panel() {
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_CLIP));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_CLIP));
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(130, 115, 38, 20, "Wrap");
@ -193,7 +193,7 @@ Fl_Double_Window* make_widget_panel() {
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_WRAP));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_WRAP));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(278, 115, 20, 20, "@-1<-");
o->tooltip("Left-align the label.");
@ -201,7 +201,7 @@ Fl_Double_Window* make_widget_panel() {
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_LEFT));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_LEFT));
o->hide();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(303, 115, 20, 20, "@-1->");
@ -210,7 +210,7 @@ Fl_Double_Window* make_widget_panel() {
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_RIGHT));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_RIGHT));
o->hide();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(328, 115, 20, 20, "@-18");
@ -219,7 +219,7 @@ Fl_Double_Window* make_widget_panel() {
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_TOP));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_TOP));
o->hide();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(353, 115, 20, 20, "@-12");
@ -228,7 +228,7 @@ Fl_Double_Window* make_widget_panel() {
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_BOTTOM));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_BOTTOM));
o->hide();
} // Fl_Button* o
{ Fl_Choice* o = new Fl_Choice(172, 115, 110, 20);
@ -251,7 +251,7 @@ Fl_Double_Window* make_widget_panel() {
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_INSIDE));
o->callback((Fl_Callback*)align_cb, (void*)((fl_intptr_t)FL_ALIGN_INSIDE));
} // Fl_Button* o
{ Fl_Box* o = new Fl_Box(404, 115, 0, 20);
o->labelsize(11);

View File

@ -96,37 +96,37 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
} {
Fl_Button {} {
label Clip
user_data FL_ALIGN_CLIP
user_data {(fl_intptr_t)FL_ALIGN_CLIP}
callback align_cb
tooltip {Clip the label to the inside of the widget.} xywh {95 115 30 20} type Toggle selection_color 8 labelsize 11 align 16
}
Fl_Button {} {
label Wrap
user_data FL_ALIGN_WRAP
user_data {(fl_intptr_t)FL_ALIGN_WRAP}
callback align_cb
tooltip {Wrap the label text.} xywh {130 115 38 20} type Toggle selection_color 8 labelsize 11
}
Fl_Button {} {
label {@-1<-}
user_data FL_ALIGN_LEFT
user_data {(fl_intptr_t)FL_ALIGN_LEFT}
callback align_cb
tooltip {Left-align the label.} xywh {278 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-1->}
user_data FL_ALIGN_RIGHT
user_data {(fl_intptr_t)FL_ALIGN_RIGHT}
callback align_cb
tooltip {Right-align the label.} xywh {303 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-18}
user_data FL_ALIGN_TOP
user_data {(fl_intptr_t)FL_ALIGN_TOP}
callback align_cb
tooltip {Top-align the label.} xywh {328 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-12}
user_data FL_ALIGN_BOTTOM
user_data {(fl_intptr_t)FL_ALIGN_BOTTOM}
callback align_cb
tooltip {Bottom-align the label.} xywh {353 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
@ -141,27 +141,27 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
}
MenuItem {} {
label {image over text}
user_data FL_ALIGN_IMAGE_OVER_TEXT
user_data {(fl_intptr_t)FL_ALIGN_IMAGE_OVER_TEXT} selected
xywh {25 25 100 20} labelsize 11
}
MenuItem {} {
label {text over image}
user_data FL_ALIGN_TEXT_OVER_IMAGE
user_data {(fl_intptr_t)FL_ALIGN_TEXT_OVER_IMAGE}
xywh {15 15 100 20} labelsize 11
}
MenuItem {} {
label {text next to image}
user_data FL_ALIGN_TEXT_NEXT_TO_IMAGE
user_data {(fl_intptr_t)FL_ALIGN_TEXT_NEXT_TO_IMAGE}
xywh {35 35 100 20} labelsize 11
}
MenuItem {} {
label {image next to text}
user_data FL_ALIGN_IMAGE_NEXT_TO_TEXT
user_data {(fl_intptr_t)FL_ALIGN_IMAGE_NEXT_TO_TEXT}
xywh {45 45 100 20} labelsize 11
}
MenuItem {} {
label {image is backdrop}
user_data FL_ALIGN_IMAGE_BACKDROP
user_data {(fl_intptr_t)FL_ALIGN_IMAGE_BACKDROP}
xywh {55 55 100 20} labelsize 11
}
}
@ -176,47 +176,47 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
}
MenuItem {} {
label {top left}
user_data FL_ALIGN_TOP_LEFT
user_data {(fl_intptr_t)FL_ALIGN_TOP_LEFT}
xywh {45 45 100 20} labelsize 11
}
MenuItem {} {
label top
user_data FL_ALIGN_TOP
user_data {(fl_intptr_t)FL_ALIGN_TOP}
xywh {55 55 100 20} labelsize 11
}
MenuItem {} {
label {top right}
user_data FL_ALIGN_TOP_RIGHT
user_data {(fl_intptr_t)FL_ALIGN_TOP_RIGHT}
xywh {65 65 100 20} labelsize 11
}
MenuItem {} {
label left
user_data FL_ALIGN_LEFT
user_data {(fl_intptr_t)FL_ALIGN_LEFT}
xywh {75 75 100 20} labelsize 11
}
MenuItem {} {
label center
user_data FL_ALIGN_CENTER
user_data {(fl_intptr_t)FL_ALIGN_CENTER}
xywh {35 35 100 20} labelsize 11
}
MenuItem {} {
label right
user_data FL_ALIGN_RIGHT
user_data {(fl_intptr_t)FL_ALIGN_RIGHT}
xywh {85 85 100 20} labelsize 11
}
MenuItem {} {
label {bottom left}
user_data FL_ALIGN_BOTTOM_LEFT
user_data {(fl_intptr_t)FL_ALIGN_BOTTOM_LEFT}
xywh {95 95 100 20} labelsize 11
}
MenuItem {} {
label bottom
user_data FL_ALIGN_BOTTOM
user_data {(fl_intptr_t)FL_ALIGN_BOTTOM}
xywh {105 105 100 20} labelsize 11
}
MenuItem {} {
label {bottom right}
user_data FL_ALIGN_BOTTOM_RIGHT
user_data {(fl_intptr_t)FL_ALIGN_BOTTOM_RIGHT}
xywh {115 115 100 20} labelsize 11 divider
}
MenuItem {} {
@ -226,28 +226,28 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
}
MenuItem {} {
label {left top}
user_data FL_ALIGN_LEFT_TOP
user_data {(fl_intptr_t)FL_ALIGN_LEFT_TOP}
xywh {135 135 100 20} labelsize 11
}
MenuItem {} {
label {right top}
user_data FL_ALIGN_RIGHT_TOP
user_data {(fl_intptr_t)FL_ALIGN_RIGHT_TOP}
xywh {145 145 100 20} labelsize 11
}
MenuItem {} {
label {left bottom}
user_data FL_ALIGN_LEFT_BOTTOM
user_data {(fl_intptr_t)FL_ALIGN_LEFT_BOTTOM}
xywh {155 155 100 20} labelsize 11
}
MenuItem {} {
label {right bottom}
user_data FL_ALIGN_RIGHT_BOTTOM
user_data {(fl_intptr_t)FL_ALIGN_RIGHT_BOTTOM}
xywh {45 45 100 20} labelsize 11
}
}
Fl_Button {} {
label {@-3square}
user_data FL_ALIGN_INSIDE
user_data {(fl_intptr_t)FL_ALIGN_INSIDE}
callback align_cb
tooltip {Show the label inside the widget.} xywh {378 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8
}
@ -363,7 +363,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
Fl_Button {} {
label {Shortcut:}
callback shortcut_in_cb
comment {This is a special button that grabs keystrokes directly} selected
comment {This is a special button that grabs keystrokes directly}
tooltip {The shortcut key for the widget.} xywh {95 210 310 20} box DOWN_BOX color 7 selection_color 7 labelfont 1 labelsize 11 align 4
code0 {\#include "Shortcut_Button.h"}
class Shortcut_Button