---
title: "disableWarning(_:_:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/cxxsetting/disablewarning(_:_:)"
---

# disableWarning(_:_:)

Disable a specific C++ compiler warning group.

## Declaration

```swift
static func disableWarning(_ name: String, _ condition: BuildSettingCondition? = nil) -> CXXSetting
```

## Parameters

- `name`: The name of the warning group to disable.
- `condition`: A condition that restricts the application of the build setting.

## Discussion

Discussion Use this setting to disable a specific warning group. This is equivalent to passing -Wno- followed by the group name to the C++ compiler. note: First available in PackageDescription 6.2.
