Changeset f5c16a in git


Ignore:
Timestamp:
Jan 2, 2012, 1:01:03 PM (11 years ago)
Author:
Jan Engelhardt <jengelh@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc
Parents:
2ca913e06398611885532b5da04c2bc187a99128
git-author:
Jan Engelhardt <jengelh@inai.de>2012-01-02 13:01:03+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-12-06 20:20:38+01:00
Message:
src: resolve strict-aliasing violation in ndbm.cc

ndbm.cc: In function 'datum dbm_nextkey(DBM*)':
ndbm.cc:294:36: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ndbm.cc

    r2ca913e rf5c16a  
    291291#endif
    292292    }
    293     if (((short *)db->dbm_pagbuf)[0] != 0)
     293    short tmp;
     294    memcpy(&tmp, db->dbm_pagbuf, sizeof(short));
     295    if (tmp != 0)
    294296    {
    295297      item = makdatum(db->dbm_pagbuf, db->dbm_keyptr);
Note: See TracChangeset for help on using the changeset viewer.