Skip to content

Commit

Permalink
Made changes to allow the compiler to compile without warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkolban committed Aug 9, 2015
1 parent cd69be7 commit b500a1f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cores/esp8266/Tone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@
#include "Arduino.h"
#include "pins_arduino.h"

/*
static int8_t toneBegin(uint8_t _pin) {
//TODO implement tone
return 0;
}
*/

void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) {
//TODO implement tone
Expand Down
2 changes: 1 addition & 1 deletion cores/esp8266/Updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ class UpdaterClass {
void _reset();
bool _writeBuffer();

uint8_t _error;
uint8_t *_buffer;
size_t _bufferLen;
size_t _size;
uint32_t _startAddress;
uint32_t _currentAddress;
uint8_t _error;
};

extern UpdaterClass Update;
Expand Down
4 changes: 2 additions & 2 deletions cores/esp8266/cbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class cbuf {
size_t bytes_available = getSize();
size_t size_to_read = (size < bytes_available) ? size : bytes_available;
size_t size_read = size_to_read;
if(_end < _begin && size_to_read > _bufend - _begin) {
if(_end < _begin && size_to_read > (size_t)(_bufend - _begin)) {
size_t top_size = _bufend - _begin;
memcpy(dst, _begin, top_size);
_begin = _buf;
Expand All @@ -95,7 +95,7 @@ class cbuf {
size_t bytes_available = room();
size_t size_to_write = (size < bytes_available) ? size : bytes_available;
size_t size_written = size_to_write;
if(_end > _begin && size_to_write > _bufend - _end) {
if(_end > _begin && size_to_write > (size_t)(_bufend - _end)) {
size_t top_size = _bufend - _end;
memcpy(_end, src, top_size);
_end = _buf;
Expand Down
4 changes: 3 additions & 1 deletion cores/esp8266/core_esp8266_postmortem.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void uart_write_char_d(char c);
static void uart0_write_char_d(char c);
static void uart1_write_char_d(char c);
static void print_stack(uint32_t start, uint32_t end);
static void print_pcs(uint32_t start, uint32_t end);
//static void print_pcs(uint32_t start, uint32_t end);

void __wrap_system_restart_local() {
register uint32_t sp asm("a1");
Expand Down Expand Up @@ -108,6 +108,7 @@ static void print_stack(uint32_t start, uint32_t end) {
ets_printf("<<<stack<<<\n");
}

/*
static void print_pcs(uint32_t start, uint32_t end) {
uint32_t n = 0;
ets_printf("\n>>>pc>>>\n");
Expand All @@ -122,6 +123,7 @@ static void print_pcs(uint32_t start, uint32_t end) {
}
ets_printf("<<<pc<<<\n");
}
*/

void uart_write_char_d(char c) {
uart0_write_char_d(c);
Expand Down
3 changes: 3 additions & 0 deletions cores/esp8266/core_esp8266_si2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ void twi_stop(void){

static void twi_delay(unsigned char v){
unsigned int i;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
unsigned int reg;
for(i=0;i<v;i++) reg = GPI;
#pragma GCC diagnostic pop
}

static bool twi_write_start(void) {
Expand Down

0 comments on commit b500a1f

Please sign in to comment.