Remove "passing NULL to non-pointer argument" warning.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2016-02-28 06:28:19 +00:00
parent 1883e9d386
commit 9f91e336a1
+3 -3
View File
@@ -47,7 +47,7 @@
\version 1.3.4 (1.3.3 without the highres parameter)
*/
Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res) : Fl_Widget_Surface(NULL) {
initialize_(NULL, w, h, high_res);
initialize_((Fl_Offscreen)0, w, h, high_res);
}
void Fl_Image_Surface::initialize_(Fl_Offscreen pixmap, int w, int h, int high_res) {
@@ -255,7 +255,7 @@ static int find_slot() { // return an available slot to memorize an Fl_Image_Sur
*/
Fl_Offscreen fl_create_offscreen(int w, int h) {
int rank = find_slot();
if (rank < 0) return NULL;
if (rank < 0) return (Fl_Offscreen)0;
offscreen_api_surface[rank] = new Fl_Image_Surface(w, h);
return offscreen_api_surface[rank]->offscreen;
}
@@ -263,7 +263,7 @@ Fl_Offscreen fl_create_offscreen(int w, int h) {
#if USE_X11
Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h) {
int rank = find_slot();
if (rank < 0) return NULL;
if (rank < 0) return (Fl_Offscreen)0;
Fl_Offscreen pixmap = XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen), w, h, 32);
offscreen_api_surface[rank] = new Fl_Image_Surface(pixmap, w, h);
return pixmap;