X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=jpeg.c;h=4934b75899220afaa8820512e42a8c418abe1f37;hb=aa33d8f8642530f7f266d6cde1422f95aa74b2be;hp=b0a8da9072e740d100e1c8880b4ccfb17a05559f;hpb=60957c2f74fc42d2ab59e5973a469b2e9ee39824;p=xonotic%2Fdarkplaces.git diff --git a/jpeg.c b/jpeg.c index b0a8da90..4934b758 100644 --- a/jpeg.c +++ b/jpeg.c @@ -472,7 +472,7 @@ static void JPEG_SkipInputData (j_decompress_ptr cinfo, long num_bytes) static void JPEG_MemSrc (j_decompress_ptr cinfo, const qbyte *buffer) { - cinfo->src = cinfo->mem->alloc_small ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof (struct jpeg_source_mgr)); + cinfo->src = (struct jpeg_source_mgr *)cinfo->mem->alloc_small ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof (struct jpeg_source_mgr)); cinfo->src->next_input_byte = buffer; cinfo->src->bytes_in_buffer = fs_filesize; @@ -530,8 +530,8 @@ qbyte* JPEG_LoadImage (const qbyte *f, int matchwidth, int matchheight) return NULL; } - image_rgba = Mem_Alloc(tempmempool, image_width * image_height * 4); - scanline = Mem_Alloc(tempmempool, image_width * cinfo.output_components); + image_rgba = (qbyte *)Mem_Alloc(tempmempool, image_width * image_height * 4); + scanline = (qbyte *)Mem_Alloc(tempmempool, image_width * cinfo.output_components); if (!image_rgba || !scanline) { if (!image_rgba)