mozga-intel opened a new pull request #20582:
URL: https://github.com/apache/incubator-mxnet/pull/20582


   ## Description ##
   Zero initialization (**) to avoid error message on a Centos: error: 
[-Werror=maybe-uninitialized] is used to allows the user to selectively enable 
or disable certain types of diagnostics, and change the kind of the diagnostic. 
A Centos has shown an error message that `'*((void*)& param +129)'` may be used 
uninitialized in this function - as follows: 
   
   ```Shell
   
/work/mxnet/src/api/operator/numpy/random/../../../../operator/numpy/random/np_choice_op.h:43:8:
 error: '*((void*)& param +129)' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
   
   [2021-09-03T20:41:39.011Z]  struct NumpyChoiceParam : public 
dmlc::Parameter<NumpyChoiceParam> {
   
   [2021-09-03T20:41:39.011Z]         ^~~~~~~~~~~~~~~~
   
   [2021-09-03T20:41:39.011Z] 
/work/mxnet/src/api/operator/numpy/random/np_choice_op.cc:40:24: note: 
'*((void*)& param +129)' was declared here
   
   [2021-09-03T20:41:39.011Z]    op::NumpyChoiceParam param;
   ```
   
   (**) Following the 
[doc](https://en.cppreference.com/w/cpp/language/zero_initialization): 
   > As part of value-initialization sequence for non-class types and for 
members of value-initialized class types that have no constructors, including 
value initialization of elements of aggregates for which no initializers are 
provided.
   
   
   ## Checklist ##
   ### Essentials ###
   - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], 
[FEATURE], [DOC], etc)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [ ] Code is well-documented
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be 
made.
   - Interesting edge cases to note here
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to