From: Tom Lane Date: Wed, 24 Dec 2025 02:38:43 +0000 (-0500) Subject: Fix another case of indirectly casting away const. X-Git-Url: http://git.postgresql.org/gitweb/static/graphics?a=commitdiff_plain;h=HEAD;p=postgresql.git Fix another case of indirectly casting away const. This one was missed in 8f1791c61, because the machines that detected those issues don't compile this function. Author: Bertrand Drouvot Reviewed-by: Tom Lane Discussion: https://postgr.es/m/1324889.1764886170@sss.pgh.pa.us --- diff --git a/src/port/getopt.c b/src/port/getopt.c index 655fef3b0c7..2cca5a0673a 100644 --- a/src/port/getopt.c +++ b/src/port/getopt.c @@ -72,7 +72,7 @@ int getopt(int nargc, char *const *nargv, const char *ostr) { static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ + const char *oli; /* option letter list index */ if (!*place) { /* update scanning pointer */