diff --git a/cmake/ftxui_set_options.cmake b/cmake/ftxui_set_options.cmake
index a269286ea15b91f442ce1590a9c580deb640f0a6..d01cafe532a1d751a0af523835210923eed1623c 100644
--- a/cmake/ftxui_set_options.cmake
+++ b/cmake/ftxui_set_options.cmake
@@ -77,6 +77,10 @@ function(ftxui_set_options library)
       target_compile_options(${library} PRIVATE "-Wpedantic")
       target_compile_options(${library} PRIVATE "-Wshadow")
       target_compile_options(${library} PRIVATE "-Wunused")
+      
+      if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+        target_compile_options(${library} PRIVATE "-Wuseless-cast")
+      endif()
     endif()
   endif()
 
diff --git a/src/ftxui/component/container.cpp b/src/ftxui/component/container.cpp
index 01e724f303f58ffb1420f9159dd37f7ad19b866c..d8a0482afb2c7ca966684c23680eff18bbff75a1 100644
--- a/src/ftxui/component/container.cpp
+++ b/src/ftxui/component/container.cpp
@@ -82,8 +82,8 @@ class ContainerBase : public ComponentBase {
       return;
     }
     for (size_t offset = 1; offset < children_.size(); ++offset) {
-      const size_t i = ((size_t(*selector_ + offset * dir + children_.size())) %
-                        children_.size());
+      const size_t i =
+          (*selector_ + offset * dir + children_.size()) % children_.size();
       if (children_[i]->Focusable()) {
         *selector_ = int(i);
         return;
diff --git a/src/ftxui/component/terminal_input_parser.cpp b/src/ftxui/component/terminal_input_parser.cpp
index 5dbd28e4f06e9429b1d1d9cc8e2ce6683669bf3d..c60c4f01ff9ac7b70c6c01237b1804a44e1e2f59 100644
--- a/src/ftxui/component/terminal_input_parser.cpp
+++ b/src/ftxui/component/terminal_input_parser.cpp
@@ -201,7 +201,7 @@ TerminalInputParser::Output TerminalInputParser::Parse() {
 // Then some sequences are illegal if it exist a shorter representation of the
 // same codepoint.
 TerminalInputParser::Output TerminalInputParser::ParseUTF8() {
-  auto head = static_cast<unsigned char>(Current());
+  auto head = Current();
   unsigned char selector = 0b1000'0000;  // NOLINT
 
   // The non code-point part of the first byte.
@@ -234,7 +234,7 @@ TerminalInputParser::Output TerminalInputParser::ParseUTF8() {
     }
 
     // Invalid continuation byte.
-    head = static_cast<unsigned char>(Current());
+    head = Current();
     if ((head & 0b1100'0000) != 0b1000'0000) {  // NOLINT
       return DROP;
     }
@@ -322,7 +322,7 @@ TerminalInputParser::Output TerminalInputParser::ParseCSI() {
 
     if (Current() >= '0' && Current() <= '9') {
       argument *= 10;  // NOLINT
-      argument += int(Current() - '0');
+      argument += Current() - '0';
       continue;
     }