Skip to content

Commit 2472970

Browse files
Links2004igrr
authored andcommitted
fix some warnings
warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] warning: defined but not used [-Wunused-variable] warning: declared 'static' but never defined [-Wunused-function] warning: suggest parentheses around '&&' within '||' [-Wparentheses}
1 parent 2b3302c commit 2472970

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

cores/esp8266/core_esp8266_noniso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ char * dtostrf(double number, signed char width, unsigned char prec, char *s) {
180180
// Extract the integer part of the number and print it
181181
unsigned long int_part = (unsigned long) number;
182182
double remainder = number - (double) int_part;
183-
out += sprintf(out, "%d", int_part);
183+
out += sprintf(out, "%ld", int_part);
184184

185185
// Print the decimal point, but only if there are digits beyond
186186
if(prec > 0) {

cores/esp8266/core_esp8266_wiring_digital.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ volatile uint32_t* portModeRegister(uint32_t port) {
6363
enum PinFunction {
6464
GPIO, PWM
6565
};
66-
static uint32_t g_gpio_function[PINCOUNT] = { GPIO };
6766

6867
extern void __pinMode(uint8_t pin, uint8_t mode) {
6968
if(pin == 16) {

libraries/ESP8266WebServer/src/ESP8266WebServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void ESP8266WebServer::_parseArguments(String data)
259259
Serial.print(" &@ ");
260260
Serial.println(next_arg_index);
261261
#endif
262-
if (equal_sign_index == -1 || equal_sign_index > next_arg_index && next_arg_index != -1) {
262+
if ((equal_sign_index == -1) || ((equal_sign_index > next_arg_index) && (next_arg_index != -1))) {
263263
#ifdef DEBUG
264264
Serial.print("arg missing value: ");
265265
Serial.println(iarg);

libraries/ESP8266WiFi/src/lwip/mem_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
4545

4646
//static unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
47-
static unsigned char *ucHeap;
47+
//static unsigned char *ucHeap;
4848

4949
typedef struct A_BLOCK_LINK
5050
{
@@ -56,16 +56,16 @@ static const unsigned short heapSTRUCT_SIZE = ( sizeof( xBlockLink ) + portBYTE_
5656

5757
//static const size_t xTotalHeapSize = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
5858

59-
static xBlockLink xStart, *pxEnd = NULL;
59+
//static xBlockLink xStart, *pxEnd = NULL;
6060

6161
//static size_t xFreeBytesRemaining = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
6262

6363

6464
/*------------------------º¯ÊýÉùÃ÷-----------------------------------*/
6565

66-
static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;
66+
//static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert ) ;//ICACHE_FLASH_ATTR;
6767

68-
static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;
68+
//static void prvHeapInit( void ) ;//ICACHE_FLASH_ATTR;
6969

7070
void vApplicationMallocFailedHook( void ) ;//ICACHE_FLASH_ATTR;
7171

0 commit comments

Comments
 (0)