<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>error: pointer of type &amp;#039;void *&amp;#039; used in arithmetic</title>
<description> I don&amp;#039;t get it. I don&amp;#039;t see whats wrong.

Can someone please tell me whats wrong with this?

main.cpp: In function &amp;#039;void drawPng(const unsigned char*, u16, u16)&amp;#039;:
main.cpp:45: error: pointer of type &amp;#039;void *&amp;#039; used in arithmetic
main.cpp:45: error: pointer of type &amp;#039;void *&amp;#039; used in arithmetic

void drawPng(const unsigned char *img, u16 x, u16 y) {

IMGCTX ctx;
PNGUPROP imgProp;

ctx = PNGU_SelectImageFromBuffer(img);
PNGU_GetImageProperties(ctx, &amp;imgProp);

ln 45 PNGU_DECODE_TO_COORDS_YCbYCr(ctx, x, y, imgProp.imgWidth, imgProp.imgHeight, rmode-&amp;gt;fbWidth, rmode-&amp;gt;xfbHeight, xfb);

}</description><link>http://forum.wiibrew.org/read.php?11,14088,14088#msg-14088</link><lastBuildDate>Sat, 18 Jul 2026 11:22:27 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,14088,14099#msg-14099</guid>
<title>Re: error: pointer of type &#039;void *&#039; used in arithmetic</title><link>http://forum.wiibrew.org/read.php?11,14088,14099#msg-14099</link><description><![CDATA[ Solved it. Some reason it didn&#039;t want to compile as cpp, but would as c.<br /><br />Edited pngu.h<br /><br /><pre class="bbcode">
// Macro for decoding an image inside a buffer at given coordinates.
#define PNGU_DECODE_TO_COORDS_YCbYCr(ctx,coordX,coordY,imgWidth,imgHeight,bufferWidth,bufferHeight,buffer)	\
																											\
		PNGU_DecodeToYCbYCr (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 +	\
							(coordX) * 2, (bufferWidth) - (imgWidth))</pre><br />changed (void *) to (u32 *)]]></description>
<dc:creator>noob</dc:creator>
<category>Coding</category><pubDate>Mon, 13 Apr 2009 07:14:03 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,14088,14088#msg-14088</guid>
<title>error: pointer of type &#039;void *&#039; used in arithmetic</title><link>http://forum.wiibrew.org/read.php?11,14088,14088#msg-14088</link><description><![CDATA[ I don&#039;t get it. I don&#039;t see whats wrong.<br /><br />Can someone please tell me whats wrong with this?<br /><br /><pre class="bbcode">main.cpp: In function &#039;void drawPng(const unsigned char*, u16, u16)&#039;:
main.cpp:45: error: pointer of type &#039;void *&#039; used in arithmetic
main.cpp:45: error: pointer of type &#039;void *&#039; used in arithmetic</pre><br /><pre class="bbcode">void drawPng(const unsigned char *img, u16 x, u16 y) {

	IMGCTX ctx;
	PNGUPROP imgProp;
	
	ctx = PNGU_SelectImageFromBuffer(img);
	PNGU_GetImageProperties(ctx, &imgProp);
	
ln 45	PNGU_DECODE_TO_COORDS_YCbYCr(ctx, x, y, imgProp.imgWidth, imgProp.imgHeight, rmode-&gt;fbWidth, rmode-&gt;xfbHeight, xfb);

}</pre>]]></description>
<dc:creator>noob</dc:creator>
<category>Coding</category><pubDate>Mon, 13 Apr 2009 03:40:10 +0200</pubDate></item>
</channel>
</rss>