Re: RV: Compilation warning on 9.5
От | Robert Haas |
---|---|
Тема | Re: RV: Compilation warning on 9.5 |
Дата | |
Msg-id | CA+TgmoZGG5GYhANPoUXe+nbjHmT8DvmY3evKAvwWD_CeNaPwew@mail.gmail.com обсуждение исходный текст |
Ответ на | RV: Compilation warning on 9.5 (Vicky Vergara <vicky_vergara@hotmail.com>) |
Список | pgsql-hackers |
On Mon, Nov 7, 2016 at 2:34 PM, Vicky Vergara <vicky_vergara@hotmail.com> wrote:
--
Hello,Posting an update to this issue (which by the way also shows up on 9.6)
Maybe this information is useful for extension developers (that have all the warnings flags on while developing using GNUC)
By wrapping the files as follows, any warnings generated by the postgres's header files are ignored.
#ifdef __GNUC__ #pragma GCC diagnostic ignored "-pedantic" #endif #include "postgres.h" #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include "executor/spi.h" #ifdef __GNUC__ #pragma GCC diagnostic pop #pragma GCC diagnostic pop #endif
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include "funcapi.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
Wow, that's pretty ugly. But it's useful to know that it is available in a pinch. Thanks!
В списке pgsql-hackers по дате отправления: