Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
r6
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-pycom committed Oct 28, 2021
1 parent 7d11de9 commit c5a0a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esp32/pycom_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef VERSION_H_
#define VERSION_H_

#define SW_VERSION_NUMBER "1.20.2.r5"
#define SW_VERSION_NUMBER "1.20.2.r6"

#define LORAWAN_VERSION_NUMBER "1.0.2"

Expand Down

3 comments on commit c5a0a97

@robert-hh
Copy link
Contributor

@robert-hh robert-hh commented on c5a0a97 Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying to compile this version, I get the warning:

mods/modlora.c: In function 'lora_recv':
mods/modlora.c:1630:28: error: 'rx_data.port' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             *port = rx_data.port;
                     ~~~~~~~^~~~~

Looking at the code, it looks like an error.

@robert-hh
Copy link
Contributor

@robert-hh robert-hh commented on c5a0a97 Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another error. There were warning as well, which I defined away:

mods/modbt.c: In function 'bt_set_advertisement':
mods/modbt.c:1664:13: error: 'memcpy' forming offset [5, 16] is out of the bounds [0, 4] of object 'srv_uuid' with type 'uint32_t' {aka 'unsigned int'} [-Werror=array-bounds]
             memcpy(uuid_buf, (uint8_t *)&srv_uuid, sizeof(uuid_buf));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mods/modbt.c:1662:22: note: 'srv_uuid' declared here
             uint32_t srv_uuid = mp_obj_get_int_truncated(args[3].u_obj);
                      ^~~~~~~~

The respective code lines are:

            uint32_t srv_uuid = mp_obj_get_int_truncated(args[3].u_obj);
            uint8_t uuid_buf[16] = {0};
            memcpy(uuid_buf, (uint8_t *)&srv_uuid, sizeof(uuid_buf));

@robert-hh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More errors:

util/mperror.c: In function 'mperror_signal_error':
util/mperror.c:113:18: error: '~' on a boolean expression [-Werror=bool-operation]
         toggle = ~toggle;
                  ^
util/mperror.c:113:18: note: did you mean to use logical not?
         toggle = ~toggle;
                  ^
                  !
At top level:
util/mperror.c:55:28: error: 'pyb_heartbeat_obj' defined but not used [-Werror=unused-const-variable=]
 STATIC const mp_obj_base_t pyb_heartbeat_obj = {&pyb_heartbeat_type};

What the hell are you doing. Do you not even compile you code with warnings enabled? Some of them really point at errors.

Please sign in to comment.