From: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | casting away const in comparators |
Date: | 2016-09-28 00:01:48 |
Message-ID: | 18DB7175-98EA-4C79-8B67-F4A57692DE5D@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
comparators.patch.1 | application/octet-stream | 16.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Dilger | 2016-09-28 00:08:24 | typedef FileName not const? |
Previous Message | Mark Dilger | 2016-09-27 23:35:49 | should xlog_outdesc modify its argument? |