Skip to content

Commit

Permalink
Merge pull request #24 from dutow/warningfix
Browse files Browse the repository at this point in the history
PG-1237: Fixing warnings on the postgres side
  • Loading branch information
dutow authored Dec 5, 2024
2 parents f4d272b + 5d28072 commit 5ebf008
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 50 deletions.
6 changes: 4 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ postgres_lib_d = get_option('extra_lib_dirs')

cppflags = []

cflags = []
cxxflags = []
cflags = ['-Werror']
cxxflags = ['-Werror']
cflags_warn = []
cxxflags_warn = []
cflags_mod = []
Expand Down Expand Up @@ -3150,6 +3150,8 @@ subdir('src')

subdir('contrib')

subdir('src/bin')

subdir('src/test')
subdir('src/interfaces/libpq/test')
subdir('src/interfaces/ecpg/test')
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/transam/xlogreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ static void WALOpenSegmentInit(WALOpenSegment *seg, WALSegmentContext *segcxt,
* Now it's here because pg_rewind and other tools compile only
* w/ xlogreader.c
*/
XLogSmgr *xlog_smgr = &xlog_smgr_standard;
const XLogSmgr *xlog_smgr = &xlog_smgr_standard;

void
SetXLogSmgr(XLogSmgr *xlsmgr)
SetXLogSmgr(const XLogSmgr *xlsmgr)
{
xlog_smgr = xlsmgr;
}
Expand Down
39 changes: 0 additions & 39 deletions src/bin/meson.build
Original file line number Diff line number Diff line change
@@ -1,44 +1,5 @@
# Copyright (c) 2022-2024, PostgreSQL Global Development Group

tde_decrypt_sources = []
tde_include = []
tde_deps = []

if percona_ext == true
# TODO: should be in pg_tde, ideally as a static lib
tde_decrypt_sources = files(
'../../contrib/pg_tde/src/access/pg_tde_tdemap.c',
'../../contrib/pg_tde/src/access/pg_tde_xlog_encrypt.c',
'../../contrib/pg_tde/src/catalog/tde_global_space.c',
'../../contrib/pg_tde/src/catalog/tde_keyring.c',
'../../contrib/pg_tde/src/catalog/tde_keyring_parse_opts.c',
'../../contrib/pg_tde/src/catalog/tde_principal_key.c',
'../../contrib/pg_tde/src/common/pg_tde_utils.c',
'../../contrib/pg_tde/src/encryption/enc_aes.c',
'../../contrib/pg_tde/src/encryption/enc_tde.c',
'../../contrib/pg_tde/src/keyring/keyring_api.c',
'../../contrib/pg_tde/src/keyring/keyring_curl.c',
'../../contrib/pg_tde/src/keyring/keyring_file.c',
'../../contrib/pg_tde/src/keyring/keyring_vault.c',
'../../contrib/pg_tde/src/keyring/keyring_kmip.c',
'../../contrib/pg_tde/src/keyring/keyring_kmip_ereport.c',

'../../contrib/pg_tde/src/libkmip/libkmip/src/kmip.c',
'../../contrib/pg_tde/src/libkmip/libkmip/src/kmip_bio.c',
'../../contrib/pg_tde/src/libkmip/libkmip/src/kmip_locate.c',
'../../contrib/pg_tde/src/libkmip/libkmip/src/kmip_memset.c',
)

tde_include = include_directories(
'../../contrib/pg_tde/src/include',
'../../contrib/pg_tde/src/libkmip/libkmip/include'
)

curldep = dependency('libcurl')
tde_deps = [curldep]

endif

subdir('initdb')
subdir('pg_amcheck')
subdir('pg_archivecleanup')
Expand Down
14 changes: 11 additions & 3 deletions src/bin/pg_waldump/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,28 @@ pg_waldump_sources = files(
pg_waldump_sources += rmgr_desc_sources
pg_waldump_sources += xlogreader_sources
pg_waldump_sources += files('../../backend/access/transam/xlogstats.c')
pg_waldump_sources += tde_decrypt_sources

if host_system == 'windows'
pg_waldump_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
'--NAME', 'pg_waldump',
'--FILEDESC', 'pg_waldump - decode and display WA'])
endif

link_w = []
include_dirs = [postgres_inc]

if percona_ext == true
link_w = [pg_tde_frontend]
include_dirs = [postgres_inc, pg_tde_inc]
endif

pg_waldump = executable('pg_waldump',
pg_waldump_sources,
dependencies: [frontend_code, lz4, zstd, tde_deps],
dependencies: [frontend_code, lz4, zstd],
c_args: ['-DFRONTEND'], # needed for xlogreader et al
kwargs: default_bin_args,
include_directories: [postgres_inc, tde_include],
include_directories: include_dirs,
link_with: link_w
)
bin_targets += pg_waldump

Expand Down
4 changes: 2 additions & 2 deletions src/include/access/xlog_smgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static const XLogSmgr xlog_smgr_standard = {
.seg_write = pg_pwrite,
};

extern XLogSmgr *xlog_smgr;
extern void SetXLogSmgr(XLogSmgr *xlsmgr);
extern const XLogSmgr *xlog_smgr;
extern void SetXLogSmgr(const XLogSmgr *xlsmgr);

#endif /* XLOG_SMGR_H */
2 changes: 0 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ subdir('timezone')

subdir('backend')

subdir('bin')

subdir('pl')

subdir('interfaces')
Expand Down

0 comments on commit 5ebf008

Please sign in to comment.