You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Remove -Wswitch-enum compiler option.
The -Wswitch option included in -Wall provides the same level of coverage and allows enum options to be grouped into default.
This commit is contained in:
@@ -163,6 +163,10 @@
|
|||||||
<p>Improve coverage in <file>perl/exec</file>, <file>config/config</file>, and <file>config/parse</file> modules.</p>
|
<p>Improve coverage in <file>perl/exec</file>, <file>config/config</file>, and <file>config/parse</file> modules.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<p>Remove <id>-Wswitch-enum</id> compiler option.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<p>Error on multiple option alternate names and simplify help command.</p>
|
<p>Error on multiple option alternate names and simplify help command.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|||||||
@@ -256,8 +256,7 @@ varEq(const Variant *this1, const Variant *this2)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeKeyValue:
|
default:
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to test equality for %s", variantTypeName[this1->type]);
|
THROW_FMT(AssertError, "unable to test equality for %s", variantTypeName[this1->type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,9 +381,7 @@ varBoolForce(const Variant *this)
|
|||||||
result = varUInt64(this) != 0;
|
result = varUInt64(this) != 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case varTypeDouble:
|
default:
|
||||||
case varTypeKeyValue:
|
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeBool]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeBool]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,8 +481,7 @@ varDblForce(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeKeyValue:
|
default:
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeDouble]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeDouble]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,9 +599,7 @@ varIntForce(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeDouble:
|
default:
|
||||||
case varTypeKeyValue:
|
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,9 +705,7 @@ varInt64Force(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeDouble:
|
default:
|
||||||
case varTypeKeyValue:
|
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt64]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeInt64]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,9 +832,7 @@ varUIntForce(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeDouble:
|
default:
|
||||||
case varTypeKeyValue:
|
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeUInt]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeUInt]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,9 +948,7 @@ varUInt64Force(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeDouble:
|
default:
|
||||||
case varTypeKeyValue:
|
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeUInt64]);
|
THROW_FMT(AssertError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeUInt64]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1137,8 +1125,7 @@ varStrForce(const Variant *this)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case varTypeKeyValue:
|
default:
|
||||||
case varTypeVariantList:
|
|
||||||
THROW_FMT(FormatError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeString]);
|
THROW_FMT(FormatError, "unable to force %s to %s", variantTypeName[this->type], variantTypeName[varTypeString]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -2799,7 +2799,7 @@ fi
|
|||||||
CWARNING=$warning
|
CWARNING=$warning
|
||||||
|
|
||||||
else
|
else
|
||||||
CWARNING="$warning -Wwrite-strings -Wswitch-enum -Wconversion -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla"
|
CWARNING="$warning -Wwrite-strings -Wconversion -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ then
|
|||||||
|
|
||||||
AC_SUBST(CWARNING, $warning)
|
AC_SUBST(CWARNING, $warning)
|
||||||
else
|
else
|
||||||
AC_SUBST(CWARNING, "$warning -Wwrite-strings -Wswitch-enum -Wconversion -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla")
|
AC_SUBST(CWARNING, "$warning -Wwrite-strings -Wconversion -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set includes
|
# Set includes
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ sub run
|
|||||||
|
|
||||||
# Determine which warnings are available
|
# Determine which warnings are available
|
||||||
my $strWarningFlags =
|
my $strWarningFlags =
|
||||||
'-Werror -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wswitch-enum -Wconversion -Wformat=2' .
|
'-Werror -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wconversion -Wformat=2' .
|
||||||
' -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla' .
|
' -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith -Wvla' .
|
||||||
($self->{oTest}->{&TEST_VM} eq VM_U16 || $self->{oTest}->{&TEST_VM} eq VM_U18 ?
|
($self->{oTest}->{&TEST_VM} eq VM_U16 || $self->{oTest}->{&TEST_VM} eq VM_U18 ?
|
||||||
' -Wformat-signedness' : '') .
|
' -Wformat-signedness' : '') .
|
||||||
|
|||||||
Reference in New Issue
Block a user