[riot-commits] [RIOT-OS/RIOT] 939ca4: drivers/sdcard_spi: fix uint64_t cast location

MichelRottleuthner michel.rottleuthner at haw-hamburg.de
Thu Aug 9 11:07:12 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 939ca4e1bfd91b6476aff6262af09738f2c44e60
      https://github.com/RIOT-OS/RIOT/commit/939ca4e1bfd91b6476aff6262af09738f2c44e60
  Author: Gaƫtan Harter <gaetan.harter at fu-berlin.de>
  Date:   2018-08-09 (Thu, 09 Aug 2018)

  Changed paths:
    M drivers/sdcard_spi/sdcard_spi.c

  Log Message:
  -----------
  drivers/sdcard_spi: fix uint64_t cast location

When compiling `tests/drivers_sdcard_spi` with `avr-gcc: avr-gcc (GCC) 6.4.0`
it detected this error

    RIOT/drivers/sdcard_spi/sdcard_spi.c:1012:72:
    error: result of '512 << 10' requires 21 bits to represent, but 'int' only has 16 bits [-Werror=shift-overflow=]
    return (card->csd.v2.C_SIZE + 1) * (uint64_t)(SD_HC_BLOCK_SIZE << 10);


  Commit: 2164c97441c981c59641efff1c452c9b3de86972
      https://github.com/RIOT-OS/RIOT/commit/2164c97441c981c59641efff1c452c9b3de86972
  Author: MichelRottleuthner <michel.rottleuthner at haw-hamburg.de>
  Date:   2018-08-09 (Thu, 09 Aug 2018)

  Changed paths:
    M drivers/sdcard_spi/sdcard_spi.c

  Log Message:
  -----------
  Merge pull request #9746 from cladmi/pr/driver/sdcard_spi

drivers/sdcard_spi: fix uint64_t cast location


Compare: https://github.com/RIOT-OS/RIOT/compare/0e48bd0d9356...2164c97441c9
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the commits mailing list