# #pragma warn/ignore/error directive

Source: https://ref.dm-lang.org/DM/preprocessor/pragma/warn
Added in BYOND 515.

### Format
> `#pragma <warn|ignore|error> WarningName`

Changes the way the compiler responds to warnings (except those caused by the [`#warn` directive](https://ref.dm-lang.org/DM/preprocessor/warn.md)). The warning name appears in the compiler output when the warning is generated.

Multiple warning names can be used in the same pragma, separated by commas.

```dm
// temporarily ignore the unused_var warning
#pragma push
#pragma ignore unused_var

proc/GNDN()
    var/nothing // var defined but not used

#pragma pop
```

Here is a list of warnings that are disabled by default, but can be turned on for linting purposes:

|     Name     |                                                                                                                                                              Description                                                                                                                                                              |
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|  init_proc  |A var in a very commonly used type, like `/turf` or `/atom` or `/datum`, is being initialized with an init proc. An example is `var/stuff[]` or `var/list/stuff = list(1,2,3)` which creates a list in a special internal proc because calling [New()](https://ref.dm-lang.org/datum/proc/New.md). Best practice is to not initialize the list until it's needed.|
|frequent_call|                                                               A very commonly called proc such as [New()](https://ref.dm-lang.org/datum/proc/New.md) or [Del()](https://ref.dm-lang.org/datum/proc/Del.md) has been overridden on a type that gets created or destroyed frequently, such as `/turf`, `/atom`, or `/datum`.                                                                |

### See also
- [#pragma directive](https://ref.dm-lang.org/DM/preprocessor/pragma/index.md)
- [#warn directive](https://ref.dm-lang.org/DM/preprocessor/warn.md)
- [#error directive](https://ref.dm-lang.org/DM/preprocessor/error.md)
