Skip to content
Snippets Groups Projects
Select Git revision
  • fix-warnings
  • master default protected
  • tvbgone-fixes
  • genofire/ble-follow-py
  • schneider/ble-stability-new-phy-adv
  • schneider/ble-stability
  • msgctl/gfx_rle
  • schneider/ble-stability-new-phy
  • add_menu_vibration
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
35 results

firmware

  • Clone with SSH
  • Clone with HTTPS
  • Forked from card10 / firmware
    Source project has a limited visibility.
    Rahix's avatar
    rahix authored
    Fix faulty error handling due to always-false unsigned comparisons.
    `-Wtype-limits` revealed three errors in the firmware:
    
        ../pycardium/modules/sys_leds.c: In function 'mp_leds_get_rocket':
        ../pycardium/modules/sys_leds.c:207:10: warning: comparison is
                    always false due to limited range of data type [-Wtype-limits]
          207 |  if (ret == -EINVAL) {
              |          ^~
    
    
        ../pycardium/mphalport.c: In function 'mp_hal_set_interrupt_char':
        ../pycardium/mphalport.c:115:8: warning: comparison is always true
                    due to limited range of data type [-Wtype-limits]
          115 |  if (c != -1) {
              |        ^~
    
        ../epicardium/modules/bhi.c: In function 'epic_bhi160_enable_sensor':
        ../epicardium/modules/bhi.c:134:12: warning: comparison is always
                    false due to limited range of data type [-Wtype-limits]
          134 |  if (vs_id < 0) {
              |            ^
        ../epicardium/modules/bhi.c: In function 'epic_bhi160_disable_sensor':
        ../epicardium/modules/bhi.c:191:12: warning: comparison is always
                    false due to limited range of data type [-Wtype-limits]
          191 |  if (vs_id < 0) {
              |            ^
    
    Note that on the target platform `char` and `enum`s are unsigned.  The
    compiler has probably removed all of these `if`s so far because the
    conditions were determined to always be false.
    
    See merge request !357
    cac0bcf3
    History
    Name Last commit Last update