commit 3feeed56b071d3d89a5f4bee84e0fabc1ddc81a3 Author: kuroda.hayato%40jp.fujitsu.com Date: Tue Aug 10 07:51:49 2021 +0000 add warnings if connection is overrided diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header index c7ba93575b..067c9cf8e7 100644 --- a/src/interfaces/ecpg/preproc/ecpg.header +++ b/src/interfaces/ecpg/preproc/ecpg.header @@ -590,13 +590,14 @@ check_declared_list(const char *name) struct declared_list *ptr = NULL; for (ptr = g_declared_list; ptr != NULL; ptr = ptr -> next) { + if (!ptr->connection) + continue; if (strcmp(name, ptr -> name) == 0) { - if (ptr -> connection) - { - connection = mm_strdup(ptr -> connection); - return true; - } + if (connection) + mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten to %s.", connection, ptr->connection); + connection = mm_strdup(ptr -> connection); + return true; } } return false;