From: tsnee@gibbs.oit.unc.edu (Tom Snee)
Subject: Re: Pointer alignment/unaligned data access problem with [g]dbm [SUMMARY]
Date: 11 Jul 1993 19:43:43 GMT [thread overview]
Message-ID: <21pqhf$1de@samba.oit.unc.edu> (raw)
Many thanks to the people who responded to my posting: Ted Stockwell of
Aggregate Computing, Matt Day of Lachman Technology, Michael Corrigan of
UCSD, and Alan Rollow of DEC. The consensus seems to be that dbm and
gdbm do not properly align the data blocks that they return. The
easiest solution is to use memcpy() to copy the data returned by [g]dbm
into a structure, instead of casting the [g]dbm char * to structure *.
When I tried it, lint still warned of "possible pointer alignment
problem"s, but I did not get any runtime warnings. Thanks again.
Tom Snee
reply other threads:[~1993-07-11 19:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox