casting away const in comparators - Mailing list pgsql-hackers

From Mark Dilger
Subject casting away const in comparators
Date
Msg-id 18DB7175-98EA-4C79-8B67-F4A57692DE5D@gmail.com
Whole thread Raw
List pgsql-hackers
Friends,

comparators usually take arguments like

  (const void *a, const void *b)

and do something read-only to a and b.  In our
sources, we typically cast these to something else,
like (char *), and do something read-only.  This
generates a lot of warnings if using -Wcast-qual.
To fix that, I have converted the casts to not cast
away const.  Please find my changes, attached.

Mark Dilger


Attachment

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: should xlog_outdesc modify its argument?
Next
From: Mark Dilger
Date:
Subject: typedef FileName not const?