# Is there a way to silence some warnings produced by sway compiler?

**URL:** https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441
**Category:** Sway
**Created:** [August 9, 2024, 9:41pm UTC](https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441 "2024-08-09T21:41:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mpoplavkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/mpoplavkov/32/399_2.png) [@mpoplavkov](https://forum.fuel.network/u/mpoplavkov)
#### Post date: [August 9, 2024, 9:41pm UTC](https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441/1 "2024-08-09T21:41:58Z")

</div>

Warnings are super useful, but sometimes they become annoying, so there should be a way of muting some of them. Something like adding an annotation to a line of code that causes the warning.  
Otherwise, at some point of time, when there are too many warnings, you’re risking of just ignoring them, which is bad.

Right now I have a bunch of warnings related to violation of the CEI pattern. Although I know they’re important, but sometimes you need to violate it and use some kind of reentrancy guard instead. An example for that: [flash loans in Uniswap](https://github.com/Uniswap/v2-core/blob/ee547b17853e71ed4e0101ccfd52e70d5acded58/contracts/UniswapV2Pair.sol#L172).

---

<div class="post-metadata">

### Author: ![naz3eh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/naz3eh/32/2025_2.png) [@naz3eh](https://forum.fuel.network/u/naz3eh)
#### Post date: [August 13, 2024, 6:09am UTC](https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441/2 "2024-08-13T06:09:30Z")

</div>

Hey @mpoplavkov, sorry for the long delay in the response, I was busy with other priorities. I will have @rishabhkeshan look at it and help you out here. I appreciate your patience.

---

<div class="post-metadata">

### Author: ![rishabhkeshan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/rishabhkeshan/32/3346_2.png) [@rishabhkeshan](https://forum.fuel.network/u/rishabhkeshan)
#### Post date: [August 13, 2024, 8:47am UTC](https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441/3 "2024-08-13T08:47:56Z")

</div>

Hey @mpoplavkov are you talking about our [allow attribute](https://docs.fuel.network/docs/sway/reference/attributes/) to silence some specific warnings?

---

<div class="post-metadata">

### Author: ![mpoplavkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/mpoplavkov/32/399_2.png) [@mpoplavkov](https://forum.fuel.network/u/mpoplavkov)
#### Post date: [August 13, 2024, 1:10pm UTC](https://forum.fuel.network/t/is-there-a-way-to-silence-some-warnings-produced-by-sway-compiler/6441/4 "2024-08-13T13:10:23Z")

</div>

Looks like what I need indeed, but where to find the full list of values I can pass to this attribute? For example, how do I mute the CEI pattern violation warnings?
