Skip to content

Commit

Permalink
Remove compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdm committed Aug 13, 2011
1 parent 8052e8c commit 17b1ebe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cairo.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include "config.h"
#endif

#if defined(CAIRO_HAS_FT_FONT) && defined(HAVE_FREETYPE)
#include <ft2build.h>
#include FT_FREETYPE_H
#endif

#include "php.h"
#include "ext/standard/info.h"
#include "php_cairo.h"
Expand All @@ -42,7 +47,7 @@ PHP_GINIT_FUNCTION(cairo)
PHP_GSHUTDOWN_FUNCTION(cairo)
{
if (cairo_globals->ft_lib != NULL) {
FT_Done_Library(cairo_globals->ft_lib);
FT_Done_FreeType(cairo_globals->ft_lib);
}
}

Expand Down
4 changes: 2 additions & 2 deletions cairo_image_surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ PHP_FUNCTION(cairo_image_surface_create_from_png)
#endif

surface_object->closure = closure;
surface_object->surface = cairo_image_surface_create_from_png_stream(php_cairo_read_func,(void *)closure);
surface_object->surface = cairo_image_surface_create_from_png_stream((cairo_read_func_t) php_cairo_read_func, (void *)closure);
php_cairo_trigger_error(cairo_surface_status(surface_object->surface) TSRMLS_CC);
}
/* }}} */
Expand Down Expand Up @@ -475,7 +475,7 @@ PHP_METHOD(CairoImageSurface, createFromPng)
#endif

surface_object->closure = closure;
surface_object->surface = cairo_image_surface_create_from_png_stream(php_cairo_read_func,(void *)closure);
surface_object->surface = cairo_image_surface_create_from_png_stream((cairo_read_func_t) php_cairo_read_func, (void *)closure);
PHP_CAIRO_ERROR(cairo_surface_status(surface_object->surface));
}
/* }}} */
Expand Down

0 comments on commit 17b1ebe

Please sign in to comment.