summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-03-15 18:27:25 -0400
committerFranklin Wei <git@fwei.tk>2017-03-15 18:27:25 -0400
commit35d69c80a609d5533ad2ee0386bcdbc1a1f12443 (patch)
treeffc974d4585a1968f65576a3e3cf0c49811b4090 /apps
parent8628c604693d71e5f032e93bddf1fbd15bd98f06 (diff)
Rewrite void* arithmetic
cppcheck reported: [chessbox/chessbox_pgn.c:51]: (portability) 'bufptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. Change-Id: Ib2139489fa316fb61b4bcdc08f17b97eb6ad0be7
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c
index f5f19e2688..4e16834f5c 100644
--- a/apps/plugins/chessbox/chessbox_pgn.c
+++ b/apps/plugins/chessbox/chessbox_pgn.c
@@ -48,7 +48,7 @@ static void *pl_malloc(size_t size)
}
else
{
- bufptr += size;
+ bufptr = (char*)(bufptr) + size;
bufleft -= size;
return ptr;
}