Skip to content

Made changes to allow the compiler to compile without warnings. #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hardware/esp8266com/esp8266/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 hardware/esp8266com/esp8266/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 hardware/esp8266com/esp8266/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
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 hardware/esp8266com/esp8266/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