[RTEMS Project] #2731: rtems/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c:98]: (warning) Found calculation inside sizeof().

RTEMS trac trac at rtems.org
Mon Jun 6 18:09:14 UTC 2016


#2731: rtems/c/src/lib/libbsp/arm/raspberrypi/console/console_select.c:98]:
(warning) Found calculation inside sizeof().
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 Source code is

     if ( strncmp( opt, "fbcons", sizeof( "fbcons" - 1 ) ) == 0 ) {

 Maybe better code

     if ( strncmp( opt, "fbcons", sizeof( "fbcons") - 1  ) == 0 ) {

--
Ticket URL: <http://devel.rtems.org/ticket/2731>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list