Mark variable as const to prevent compiler warning
authorTomas Vondra <[email protected]>
Tue, 8 Aug 2017 10:46:55 +0000 (12:46 +0200)
committerTomas Vondra <[email protected]>
Tue, 8 Aug 2017 10:48:35 +0000 (12:48 +0200)
The quote_guc_value() result was assigned to regular (char *) variable,
resulting in compiler warning about discarding const qualifier. Fix by
marking the variable as 'const' too.

src/backend/pgxc/pool/pgxcnode.c

index 809da4f1d2fa77147e948234868290a990f1a224..66b993f53b1c43a9983291fd9734db44d5fe51cc 100644 (file)
@@ -2673,7 +2673,7 @@ get_set_command(List *param_list, StringInfo command, bool local)
        foreach (lc, param_list)
        {
                ParamEntry *entry = (ParamEntry *) lfirst(lc);
-               char *value = NameStr(entry->value);
+               const char *value = NameStr(entry->value);
 
                if (strlen(value) == 0)
                        value = "''";