Skip to content

Fix build warning in jerry-ext/arg on tizenrt-artik05x #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2017
Merged

Fix build warning in jerry-ext/arg on tizenrt-artik05x #1906

merged 1 commit into from
Jul 4, 2017

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 [email protected]

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 [email protected]
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