Commit b0f25a42 authored by George Nash's avatar George Nash Committed by Rick Bell

IOT-2539 Targeted ignore of type-limits warning

This will turn of the type-limits warning in very
targeted area in the code. The code is checking
that the user passed in value is within limits.

Although it is very unlikely to be outsite the
expected values it is possible. Tthis selectivly
shuts off the warning for the two functions the
warning is found in.

Change-Id: Id5da64534c05dffd479d911112d5569305c36d48
Signed-off-by: George Nash's avatarGeorge Nash <>
parent fcab5a4c
......@@ -211,6 +211,17 @@ ESResult ESSetDeviceProperty(ESDeviceProperty *deviceProperty)
return ES_OK;
#if defined(__GNUC__)
#pragma GCC diagnostic push
* Prevent reporting esState < ES_STATE_INT and esErrCode < ES_ERRCODE_NO_ERROR as type-limits
* The type used for an enum is decided by the compiler the only way to know that the value
* passed in by the user is within the limits is to check.
* Note this warning is seems to be limited to older compilers.
#pragma GCC diagnostic ignored "-Wtype-limits"
ESResult ESSetState(ESEnrolleeState esState)
......@@ -253,6 +264,10 @@ ESResult ESSetErrorCode(ESErrorCode esErrCode)
return ES_OK;
#if defined(__GNUC__)
#pragma GCC diagnostic pop
ESResult ESTerminateEnrollee()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment