Fix all warnings (except table.c and ff.c). Turn off "unused function" warnings

This commit is contained in:
Stefan `Sec` Zehl 2011-12-23 01:07:48 +01:00
parent 23696109cc
commit d69199e563
11 changed files with 19 additions and 12 deletions

View File

@ -42,7 +42,7 @@ CPU_TYPE = cortex-$(CORTEX_TYPE)
# Compiler settings, parameters and flags
##########################################################################
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin -Wno-unused-function
LDFLAGS = -nostartfiles

View File

@ -8,6 +8,7 @@
#include "lcd/display.h"
#include "filesystem/ff.h"
#include "filesystem/execute.h"
#include <string.h>

View File

@ -189,7 +189,7 @@ void init_flame_rgb(void) {
flameRGBSetI2C(FLAME_I2C_CR_GRPPWM, 0x00); // overall dimming
rgbDataSize = readTextFile("FLAME.RGB", rgbData, 24);
rgbDataSize = readTextFile("FLAME.RGB", (char *)rgbData, 24);
enableConfig(CFG_TYPE_FLAME,1);
}

View File

@ -3,6 +3,7 @@
#include "lcd/display.h"
#include "lcd/print.h"
#include "lcd/backlight.h"
#include "filesystem/ff.h"
#include "basic/random.h"
#include "basic/config.h"

View File

@ -89,7 +89,7 @@ uint8_t execute_file (const char * fname){
/**************************************************************************/
void executeSelect(char *ext){
void executeSelect(const char *ext){
char filename[15];
filename[0]='0';
filename[1]=':';

View File

@ -2,6 +2,6 @@
#define _EXECUTE_H_
uint8_t execute_file (const char * fname);
void executeSelect(char *ext);
void executeSelect(const char *ext);
#endif

View File

@ -8,7 +8,7 @@
#define FLEN 13
int getFiles(char files[][FLEN], uint8_t count, uint16_t skip, char *ext)
int getFiles(char files[][FLEN], uint8_t count, uint16_t skip, const char *ext)
{
DIR dir; /* Directory object */
FILINFO Finfo;
@ -45,7 +45,7 @@ int getFiles(char files[][FLEN], uint8_t count, uint16_t skip, char *ext)
}
#define PERPAGE 7
int selectFile(char *filename, char *extension)
int selectFile(char *filename, const char *extension)
{
int skip = 0;
char key;

View File

@ -4,7 +4,7 @@
#define FLEN 13
int getFiles(char files[][FLEN], uint8_t count, uint16_t skip, char *ext);
int selectFile(char *filename, char *extension);
int getFiles(char files[][FLEN], uint8_t count, uint16_t skip, const char *ext);
int selectFile(char *filename, const char *extension);
#endif

View File

@ -1,5 +1,9 @@
#include <sysdefs.h>
#include <ff.h>
#include <string.h>
#include "at45db041d.h"
#include "lcd/print.h"
#include "usb/usbmsc.h"
FATFS FatFs; /* File system object for logical drive */
@ -29,10 +33,9 @@ const uint8_t init2[] = {0x80, 0x00, 0x29, 0x37,
0x4d, 0x45, 0x20, 0x20, 0x20, 0x20, 0x46, 0x41,
0x54, 0x20, 0x20, 0x20, 0x20, 0x20};
inline void format_formatDF(void)
{
inline void format_formatDF(void) {
int i;
char buf[512];
BYTE buf[512];
memset(buf, 0, 512);
for(i=0; i<100; i++) dataflash_write(buf, i, 1);

View File

@ -1,4 +1,5 @@
#include <stdint.h>
#include <string.h>
#include "funk/openbeacon.h"
#include "funk/nrf24l01p.h"
#include "basic/byteorder.h"
@ -6,6 +7,7 @@
#include "filesystem/ff.h"
#include "basic/uuid.h"
#include "basic/config.h"
#include "basic/random.h"
#include "SECRETS"

View File

@ -270,7 +270,7 @@ void lcdDisplay(void) {
unsigned char br=0xFF, bg=0xFF, bb=0xFF;
unsigned char frame_r=0x00, frame_g=0x00, frame_b=0x80;
uint16_t color,framecolor,backcolor;
uint16_t x,y,i;
uint16_t x,y;
bool px;
uint16_t actualcolor;
color = ((r&0xF8) << 8) | ((g&0xFC)<<3) | ((b&0xF8) >> 3);