MSVC generates a number of const warnings, that's been discussed before (http://archives.postgresql.org/pgsql-hackers/2007-01/msg01214.php).
Attached patch adds a pragma to get rid of the warnings. Again, not sure if it's worth it? I think I need to #ifdef the pragma - gcc generates a warning if it sees it in -Wall, and that'd certainly be worse :-) Stefan mentioned that the warning may be one that shows up in a different compiler somewhere as well, thouh, which might indicate that we should fix the underlying issue? (Even if the code is correct, if it confuses multiple compilers...) //Magnus
Index: src/bin/psql/print.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/psql/print.c,v retrieving revision 1.91 diff -c -r1.91 print.c *** src/bin/psql/print.c 5 Jan 2007 22:19:49 -0000 1.91 --- src/bin/psql/print.c 24 Jul 2007 11:46:02 -0000 *************** *** 2011,2018 **** --- 2011,2024 ---- (const char *const *) footers, align, &opt->topt, fout, flog); + #ifdef WIN32_ONLY_COMPILER + #pragma warning(disable:4090) + #endif free(headers); free(cells); + #ifdef WIN32_ONLY_COMPILER + #pragma warning(default:4090) + #endif if (footers) { free(footers[0]); Index: src/backend/utils/adt/oracle_compat.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v retrieving revision 1.70 diff -c -r1.70 oracle_compat.c *** src/backend/utils/adt/oracle_compat.c 27 Feb 2007 23:48:08 -0000 1.70 --- src/backend/utils/adt/oracle_compat.c 24 Jul 2007 11:44:57 -0000 *************** *** 895,904 **** --- 895,910 ---- } } + #ifdef WIN32_ONLY_COMPILER + #pragma warning(disable:4090) + #endif pfree(stringchars); pfree(stringmblen); pfree(setchars); pfree(setmblen); + #ifdef WIN32_ONLY_COMPILER + #pragma warning(default:4090) + #endif } else {
---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend