On Sat, May 10, 2014 at 2:26 PM, Andreas Stieger <andreas.stie...@gmx.de>wrote:
> Hello, > > I found a compiler warning in trunk on a potentially undefined operation > when using an increment operator on a variable referenced in the same > expression. This is on gcc 4.3.4, does not happen in gcc 4.7 and up. > Treated as an error in some build configurations. > > subversion/libsvn_fs_fs/id.c: In function 'txn_id_parse': > subversion/libsvn_fs_fs/id.c:98: warning: operation on 'data' may be > undefined > > subversion/libsvn_fs_fs/transaction.c: In function 'read_next_ids': > subversion/libsvn_fs_fs/transaction.c:1300: warning: operation on 'str' > may be undefined > > subversion/libsvn_fs_x/transaction.c: In function 'read_next_ids': > subversion/libsvn_fs_x/transaction.c:1354: warning: operation on 'str' > may be undefined > > The attached patch fixes this, please review. > > [[[ > Fix warnings for potentially undefined operation. > > Some code uses increment operators on variables referenced in the same > operation. See fsfs-improvements branch (r1517479,1506545) and > fsfs-format-7 (r1453765) > > * subversion/libsvn_fs_fs/id.c > (txn_id_parse): increment data pointer in a separate statement > * subversion/libsvn_fs_fs/transaction.c > (read_next_ids): increment str pointer in a separate statement > * subversion/libsvn_fs_x/transaction.c > (read_next_ids): same > ]]] > Yuck. Good catch! Commited last Saturday as r1593795. Thanks for the patch! -- Stefan^2.