Repository: godot
Issue: -Wduplicated-branches compilation warnings on Linux/X11 builds.
Labels: enhancement,platform:linuxbsd,topic:core,topic:buildsystem

**Godot version:**
3.2 master, 0aefec24548edbb96e4991ede4465473e0c225e1

**OS/device including version:**

Ubuntu 18.04.3 LTS VM (32 and 64-bit)
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)

**Issue description:**

```
scons -j4 p=x11 tools=yes target=debug debug_symbols=yes optimize=speed warnings=extra
```

Following warnings are raised with aforementioned compiler and build command.

Warnings:

```
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = false; unsigned int write_bytes = 1; bool write_alpha = true; bool read_gray = true; bool write_gray = true; uint8_t = unsigned char]':
core/image.cpp:466:104:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = false; unsigned int write_bytes = 1; bool write_alpha = false; bool read_gray = true; bool write_gray = false; uint8_t = unsigned char]':
core/image.cpp:467:105:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = true; unsigned int write_bytes = 1; bool write_alpha = false; bool read_gray = true; bool write_gray = true; uint8_t = unsigned char]':
core/image.cpp:471:104:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = true; unsigned int write_bytes = 1; bool write_alpha = false; bool read_gray = true; bool write_gray = false; uint8_t = unsigned char]':
core/image.cpp:472:105:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = false; unsigned int write_bytes = 1; bool write_alpha = false; bool read_gray = false; bool write_gray = true; uint8_t = unsigned char]':
core/image.cpp:476:105:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 1; bool read_alpha = false; unsigned int write_bytes = 1; bool write_alpha = true; bool read_gray = false; bool write_gray = true; uint8_t = unsigned char]':
core/image.cpp:477:105:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 3; bool read_alpha = false; unsigned int write_bytes = 3; bool write_alpha = true; bool read_gray = false; bool write_gray = false; uint8_t = unsigned char]':
core/image.cpp:490:110:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
core/image.cpp: In instantiation of 'void _convert(int, int, const uint8_t*, uint8_t*) [with unsigned int read_bytes = 3; bool read_alpha = true; unsigned int write_bytes = 3; bool write_alpha = false; bool read_gray = false; bool write_gray = false; uint8_t = unsigned char]':
core/image.cpp:495:110:   required from here
cc1plus: warning: this condition has identical branches [-Wduplicated-branches]
```

Relevant code:

https://github.com/godotengine/godot/blob/0aefec24548edbb96e4991ede4465473e0c225e1/core/image.cpp#L460-L500