diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-04-28 12:45:55 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-04-28 12:45:55 -0400 |
commit | e481d26285b160058b093588e062cf3071fea192 (patch) | |
tree | bb325e77bd8e37dcc14fe6749961077719e2682b /src/backend/libpq/be-secure-openssl.c | |
parent | ac862376037727e744f25030bd8b6090c707247b (diff) | |
download | postgresql-e481d26285b160058b093588e062cf3071fea192.tar.gz postgresql-e481d26285b160058b093588e062cf3071fea192.zip |
Clean up minor warnings from buildfarm.
Be more consistent about use of XXXGetDatum macros in new jsonpath
code. This is mostly to avoid having code that looks randomly
different from everyplace else that's doing the exact same thing.
In pg_regress.c, avoid an unreferenced-function warning from
compilers that don't understand pg_attribute_unused(). Putting
the function inside the same #ifdef as its only caller is more
straightforward coding anyway.
In be-secure-openssl.c, avoid use of pg_attribute_unused() on a label.
That's pretty creative, but there's no good reason to suppose that
it's portable, and there's absolutely no need to use goto's here in the
first place. (This wasn't actually causing any buildfarm complaints,
but it's new code in v12 so it has no portability track record.)
Diffstat (limited to 'src/backend/libpq/be-secure-openssl.c')
-rw-r--r-- | src/backend/libpq/be-secure-openssl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 4490516b9e2..c38a71df587 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -1287,24 +1287,22 @@ ssl_protocol_version_to_openssl(int v, const char *guc_name, int loglevel) #ifdef TLS1_1_VERSION return TLS1_1_VERSION; #else - goto error; + break; #endif case PG_TLS1_2_VERSION: #ifdef TLS1_2_VERSION return TLS1_2_VERSION; #else - goto error; + break; #endif case PG_TLS1_3_VERSION: #ifdef TLS1_3_VERSION return TLS1_3_VERSION; #else - goto error; + break; #endif } -error: - pg_attribute_unused(); ereport(loglevel, (errmsg("%s setting %s not supported by this build", guc_name, |