public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67652] New: liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ?
@ 2015-09-20 16:38 dcb314 at hotmail dot com
  2015-09-21 13:11 ` [Bug c/67652] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2015-09-20 16:38 UTC (permalink / raw)
  To: gcc-bugs

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);


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-29 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 16:38 [Bug c/67652] New: liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ? dcb314 at hotmail dot com
2015-09-21 13:11 ` [Bug c/67652] " mpolacek at gcc dot gnu.org
2015-09-21 13:16 ` iverbin at gcc dot gnu.org
2015-09-28 16:10 ` [Bug other/67652] " iverbin at gcc dot gnu.org
2015-09-29 13:07 ` iverbin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).