Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit513ff52

Browse files
committed
Suppress compiler warnings when building with --enable-dtrace.
Most versions of "dtrace -h" drop const qualifiers from the declarationsof probe functions (though macOS gets it right). This causes compilerwarnings when we pass in pointers to const. Repair by extending ourexisting post-processing of the probes.h file. To do so, assume that all"char *" arguments should be "const char *"; that seems reasonably safe.Thomas MunroDiscussion:https://postgr.es/m/CAEepm=2j1pWSruQJqJ91ZDzD8w9ZZDsM4j2C6x75C-VryWg-_w@mail.gmail.com
1 parentf34f0e4 commit513ff52

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/utils/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ ifneq ($(enable_dtrace), yes)
4949
probes.h: Gen_dummy_probes.sed
5050
endif
5151

52+
# We editorialize on dtrace's output to the extent of changing the macro
53+
# names (from POSTGRESQL_foo to TRACE_POSTGRESQL_foo) and changing any
54+
# "char *" arguments to "const char *".
5255
probes.h: probes.d
5356
ifeq ($(enable_dtrace), yes)
5457
$(DTRACE) -C -h -s $< -o $@.tmp
55-
sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' $@.tmp >$@
58+
sed -e 's/POSTGRESQL_/TRACE_POSTGRESQL_/g' \
59+
-e 's/( *char \*/(const char */g' \
60+
-e 's/, *char \*/, const char */g' $@.tmp >$@
5661
rm $@.tmp
5762
else
5863
sed -f $(srcdir)/Gen_dummy_probes.sed $< >$@

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp