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

Gaëtan Harter hartergaetan at gmail.com
Thu Aug 9 12:17:52 CEST 2018


  Branch: refs/heads/2018.07-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: b4c82b03544636d4a0f6481a2cf30e4062b6d40f
      https://github.com/RIOT-OS/RIOT/commit/b4c82b03544636d4a0f6481a2cf30e4062b6d40f
  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);

(cherry picked from commit 939ca4e1bfd91b6476aff6262af09738f2c44e60)


  Commit: 4b7ddbacc8b499fd04197998f27a25f5c1249a42
      https://github.com/RIOT-OS/RIOT/commit/4b7ddbacc8b499fd04197998f27a25f5c1249a42
  Author: Gaëtan Harter <hartergaetan at gmail.com>
  Date:   2018-08-09 (Thu, 09 Aug 2018)

  Changed paths:
    M drivers/sdcard_spi/sdcard_spi.c

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

drivers/sdcard_spi: fix uint64_t cast location [backport 2018.07]


Compare: https://github.com/RIOT-OS/RIOT/compare/14ee90b32f8f...4b7ddbacc8b4
      **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