summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2018-12-29 00:44:39 +0100
committerMatthias Melcher <git@matthiasm.com>2018-12-29 00:44:39 +0100
commite169b1941fb1b3cfb8333ec27ab8f04671850ab9 (patch)
tree5acfa0c2ba765f860764e1105c60a095998b291f
parenta3ee6cff92b69d4ec0e3fe9a2699aa3d970f4323 (diff)
Remove a C style type cast from jpeg_mem_src.
-rw-r--r--src/Fl_JPEG_Image.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx
index 384acd2a4..6dcf030b5 100644
--- a/src/Fl_JPEG_Image.cxx
+++ b/src/Fl_JPEG_Image.cxx
@@ -255,9 +255,8 @@ extern "C" {
static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data)
{
- my_src_ptr src;
- cinfo->src = (struct jpeg_source_mgr *)malloc(sizeof(my_source_mgr));
- src = (my_src_ptr)cinfo->src;
+ my_src_ptr src = (my_source_mgr*)malloc(sizeof(my_source_mgr));
+ cinfo->src = &(src->pub);
src->pub.init_source = init_source;
src->pub.fill_input_buffer = fill_input_buffer;
src->pub.skip_input_data = skip_input_data;