Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Something's been bugging me



Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Why do you cast arguments to memcmp to char* ?

Well, *I* haven't done it in a long time, but it used to be a fairly
standard thing.  I imagine that back before memcpy was usually declared
with void * arguments, it was necessary to avoid compiler warnings.

The problem would still exist if the code were written
	memcpy((void *) &foo, ...)
so I suspect that an in-line cast to void * wouldn't work any better.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group