You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems we're still cautious about conversions between signed and unsigned integers and conversions of varying lengths. Those two compilation options can assist us in monitoring both behaviors. So, should we turn them back on?
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion")
warning: conversion from ‘uint32’ {aka ‘unsigned int’} to ‘uint8’ {aka ‘const unsigned char’} may change value [-Wconversion]
warning: conversion to ‘int32’ {aka ‘int’} from ‘uint32’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
We might use -Werror in CI to make sure we focus on the convention? 🤔
The text was updated successfully, but these errors were encountered:
From what I understand, a major reason for turning off those conversion checks is that enabling those options would result in numerous warnings from 3rd-party headers. The important information that we are concerned with would be overwhelmed by these warnings.
Using set_property() can assist us in specifying which files we want to lint. This prevents 3rd-party headers from generating too many unfixable warnings by excluding the source files that will use those headers.
It seems we're still cautious about conversions between signed and unsigned integers and conversions of varying lengths. Those two compilation options can assist us in monitoring both behaviors. So, should we turn them back on?
https://github.com/bytecodealliance/wasm-micro-runtime/blob/f1d03db8e58a268e1745ece954b44772c9522349/product-mini/platforms/linux/CMakeLists.txt#L149C1-L149C72
# set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wsign-conversion")
We might use
-Werror
in CI to make sure we focus on the convention? 🤔The text was updated successfully, but these errors were encountered: