mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-13 08:32:08 +00:00
Fixes for cppcheck errors
This commit is contained in:
parent
fb1caa51d0
commit
a10ea604af
@ -129,8 +129,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Feature toggles
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Disable use of the NTP library and related features
|
||||
//#define DISABLE_NTP
|
||||
|
||||
// Disable the welcome screen and allow
|
||||
#define DISABLE_WELCOME_UNSET
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -129,13 +129,11 @@ void init_coder() {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 28; j++) {
|
||||
byte c = usx_sets[i][j];
|
||||
if (c != 0 && c > 32) {
|
||||
usx_code_94[c - USX_OFFSET_94] = (i << 5) + j;
|
||||
if (c >= 'a' && c <= 'z')
|
||||
usx_code_94[c - USX_OFFSET_94 - ('a' - 'A')] = (i << 5) + j;
|
||||
}
|
||||
}
|
||||
}
|
||||
is_inited = 1;
|
||||
}
|
||||
|
||||
@ -147,16 +145,15 @@ unsigned int usx_mask[] = {0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF};
|
||||
/// Otherwise clen bits in code are appended to out starting with MSB
|
||||
int append_bits(char *out, int olen, int ol, byte code, int clen) {
|
||||
|
||||
byte cur_bit;
|
||||
byte blen;
|
||||
unsigned char a_byte;
|
||||
int oidx;
|
||||
|
||||
//printf("%d,%x,%d,%d\n", ol, code, clen, state);
|
||||
|
||||
while (clen > 0) {
|
||||
cur_bit = ol % 8;
|
||||
blen = clen;
|
||||
int oidx;
|
||||
unsigned char a_byte;
|
||||
|
||||
byte cur_bit = ol % 8;
|
||||
byte blen = clen;
|
||||
a_byte = code & usx_mask[blen - 1];
|
||||
a_byte >>= cur_bit;
|
||||
if (blen + cur_bit > 8)
|
||||
|
Loading…
Reference in New Issue
Block a user