Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active April 18, 2019 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lupyuen/bbc2dae52a8fdac1e70a60757fed1467 to your computer and use it in GitHub Desktop.
Save lupyuen/bbc2dae52a8fdac1e70a60757fed1467 to your computer and use it in GitHub Desktop.

Fixes for Mynewt type conversion build warnings

1️⃣ repos/apache-mynewt-core/kernel/os/include/os/os_mutex.h line 122

    return mu->mu_level;

Change to

    return (os_error_t) mu->mu_level;

2️⃣ repos/apache-mynewt-core/hw/sensor/include/sensor/sensor.h line 847

    return (sensor->s_types & sensor->s_mask & type);

Change to

    return (sensor_type_t) (sensor->s_types & sensor->s_mask & type);

3️⃣ repos/apache-mynewt-core/encoding/tinycbor/include/tinycbor/cbor.h line 201

    {   return encoder->writer->bytes_written; }

Change to

    {   return (CborError) encoder->writer->bytes_written; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment