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

Commitfa8fbad

Browse files
committed
Emit dummy statements for probes.d probes when disabled
When building without --enable-dtrace, emit dummy do {} while (0)statements for the stubbed-out TRACE_POSTGRESQL_foo() macrosinstead of empty macros that totally elide the original probestatement.This fixes the warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]introduced byb94409a.Author: Craig Ringer <craig.ringer@2ndquadrant.com>Discussion:https://www.postgresql.org/message-id/flat/20210504221531.cfvpmmdfsou6eitb%40alap3.anarazel.de
1 parent3c55410 commitfa8fbad

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎src/backend/utils/Gen_dummy_probes.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ ()
135135
$CondReg ||=$s;
136136
}
137137

138+
# s/$/ do {} while (0)/
139+
{
140+
$s =s /$/do {}while (0)/s;
141+
$CondReg ||=$s;
142+
}
143+
138144
# P
139145
{
140146
if (/^(.*)/) {print$1,"\n"; }

‎src/backend/utils/Gen_dummy_probes.sed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2,
1919
s/([^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
2020
s/([^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
2121
s/([^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\},[^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
22+
s/$/ do {} while (0)/
2223
P
2324
s/(.*$/_ENABLED() (0)/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp