This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/67652] New: liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ?
- From: "dcb314 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 20 Sep 2015 16:37:56 +0000
- Subject: [Bug c/67652] New: liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ?
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67652
Bug ID: 67652
Summary: liboffloadmic/runtime/offload_engine.cpp:176: strange
expression in sizeof ?
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
[trunk/liboffloadmic/runtime/offload_engine.cpp:176]: (warning) Found
calculation inside sizeof().
Source code is
char * env_var = (char*) malloc(sizeof("COI_DMA_CHANNEL_COUNT=2" +
1));
Maybe better code
char * env_var = (char*) malloc(sizeof("COI_DMA_CHANNEL_COUNT=2") +
1);