Skip to content

Conversation

@glistening
Copy link
Contributor

tizenrt-arttik05x treats warning as error for uninitialized use.
This patch fixes the error in jerry-ext/arg by initializing to zero.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com

tizenrt-arttik05x treats warning as error for uninitialized use.
This patch fixes the error in jerry-ext/arg by initializing to zero.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com
Copy link
Contributor

@yichoi yichoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glistening
Copy link
Contributor Author

Here is error log.

/home/brian/iotjs/jerry-tizenrt/jerryscript/jerry-ext/arg/arg-transform-functions.c: In function 'jerryx_arg_transform_uint8_strict':
/home/brian/iotjs/jerry-tizenrt/jerryscript/jerry-ext/arg/arg-transform-functions.c:151:41: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     *d = (*d >= 0.0) ? floor (*d + 0.5) : ceil (*d - 0.5);
                                         ^
/home/brian/iotjs/jerry-tizenrt/jerryscript/jerry-ext/arg/arg-transform-functions.c:172:12: note: 'tmp' was declared here
     double tmp; \
            ^
/home/brian/iotjs/jerry-tizenrt/jerryscript/jerry-ext/arg/arg-transform-functions.c:190:3: note: in expansion of macro 'JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE'
   JERRYX_ARG_TRANSFORM_FUNC_FOR_INT_TEMPLATE (type, _strict, min, max) \
   ^
/home/brian/iotjs/jerry-tizenrt/jerryscript/jerry-ext/arg/arg-transform-functions.c:193:1: note: in expansion of macro 'JERRYX_ARG_TRANSFORM_FUNC_FOR_INT'
 JERRYX_ARG_TRANSFORM_FUNC_FOR_INT (uint8, 0, UINT8_MAX)

@yichoi yichoi merged commit 0b08322 into jerryscript-project:master Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants