]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix another case of indirectly casting away const.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Dec 2025 02:38:43 +0000 (21:38 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Dec 2025 02:38:43 +0000 (21:38 -0500)
This one was missed in 8f1791c61, because the machines that
detected those issues don't compile this function.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1324889.1764886170@sss.pgh.pa.us

src/port/getopt.c

index 655fef3b0c771ce4148ebe3e484c0b8d14d671db..2cca5a0673a5772242077dc463c62a9348ce9473 100644 (file)
@@ -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 */