commit | 35d69c80a609d5533ad2ee0386bcdbc1a1f12443 | [log] [tgz] |
---|---|---|
author | Franklin Wei <git@fwei.tk> | Wed Mar 15 18:27:25 2017 -0400 |
committer | Franklin Wei <git@fwei.tk> | Wed Mar 15 18:27:25 2017 -0400 |
tree | ffc974d4585a1968f65576a3e3cf0c49811b4090 | |
parent | 8628c604693d71e5f032e93bddf1fbd15bd98f06 [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
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index f5f19e2..4e16834 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c
@@ -48,7 +48,7 @@ } else { - bufptr += size; + bufptr = (char*)(bufptr) + size; bufleft -= size; return ptr; }