@@ -530,6 +530,7 @@ function(streamfx_add_library TARGET_NAME TARGET_TYPE)
530530 "4505"
531531 "4514"
532532 "5245"
533+ "5264"
533534 # Don't warn about unreferenced variables or parameters which are assigned/initialized.
534535 "4189"
535536 # Don't warn about not-explicitly-handled enumeration identifiers
@@ -556,6 +557,10 @@ function(streamfx_add_library TARGET_NAME TARGET_TYPE)
556557 "5045"
557558 # Ignore inserted padding.
558559 "4324"
560+ # Ignore non-standard nameless struct/union.
561+ "4201"
562+ # Intended behavior: Replace undefined macros with 0
563+ "4668"
559564 )
560565 foreach (WARN ${DISABLED_WARNINGS} )
561566 target_compile_options (${TARGET_NAME} PRIVATE "/wd${WARN} " )
@@ -705,6 +710,35 @@ function(streamfx_add_library TARGET_NAME TARGET_TYPE)
705710 target_compile_options (${TARGET_NAME} PRIVATE "-Wall" )
706711 target_compile_options (${TARGET_NAME} PRIVATE "-Wextra" )
707712
713+ # - Disable useless warnings
714+ set (DISABLED_WARNINGS
715+ # Don't warn about unused variables, parameters, labels, functions, or typedefs.
716+ "unused-function"
717+ "unused-label"
718+ "unused-local-typedefs"
719+ "unused-parameter"
720+ "unused-result"
721+ "unused-const-variable"
722+ "unused-variable"
723+ "unused-value"
724+ # Don't warn about unreferenced variables or parameters which are assigned/initialized.
725+ "unused-but-set-parameter"
726+ "unused-but-set-variable"
727+ # Don't warn about not-explicitly-handled enumeration identifiers
728+ "switch"
729+ # Ignore automatic padding warnings.
730+ "padded"
731+ # Ignore implicit '= delete;'.
732+ # Ignore extra arguments for printf
733+ "format-extra-args"
734+ # Ignore undefined, unused or unreferenced pre-processor macros
735+ "unused-macros"
736+ )
737+ foreach (WARN ${DISABLED_WARNINGS} )
738+ target_compile_options (${TARGET_NAME} PRIVATE "-Wno-${WARN} " )
739+ endforeach ()
740+
741+
708742 # - Require enabled instruction sets.
709743 if (${PREFIX} TARGET_NATIVE)
710744 target_compile_options (${TARGET_NAME} PRIVATE
0 commit comments