[stx-metal] wrong code to set the terminate char.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Yan Chen |
Bug Description
Title
-----
[stx-metal] wrong code to set the terminate char.
Brief Description
-----------------
In mtce/src/
++dst_ptr = '\0' ;
should be modified as
*(++dst_ptr) = '\0' ;
Otherwise the code is useless and will generate a compile error in higher version gcc.
Severity
--------
Critical
Steps to Reproduce
------------------
Code review.
Expected Behavior
------------------
stx-metal can pass compile on gcc 8.2.1
Actual Behavior
----------------
stx-metal cannot pass compile on gcc 8.2.1
Reproducibility
---------------
100% reproducible with gcc 8.2.1
System Configuration
-------
Build time issue.
Branch/Pull Time/Commit
-------
master
Timestamp/Logs
--------------
2018-11-22 17:09:19.888 | g++ -I. -I/usr/
2018-11-22 17:09:20.261 | hwmonThreads.cpp: In function ‘void _get_field(char*, int, char*)’:
2018-11-22 17:09:20.261 | hwmonThreads.
2018-11-22 17:09:20.261 | ++dst_ptr = '\0' ;
2018-11-22 17:09:20.261 | ^~~~
2018-11-22 17:09:20.262 | make[1]: *** [Makefile:36: hwmonThreads.o] Error 1
2018-11-22 17:09:20.262 | make[1]: Leaving directory '/opt/stack/
2018-11-22 17:09:20.262 | make: *** [Makefile:17: build] Error 2
2018-11-22 17:09:20.268 | +/opt/stack/
Changed in starlingx: | |
assignee: | nobody → Yan Chen (ychen2u) |
tags: |
added: stx.2019.05 removed: stx.2019.03 |
tags: |
added: stx.2.0 removed: stx.2019.05 |
Fix proposed to branch: master /review. openstack. org/619462
Review: https:/