Commit b043a57f authored by Sergio Costas's avatar Sergio Costas

Removed warnings

parent 052089af
...@@ -57,31 +57,18 @@ void help_menu() { ...@@ -57,31 +57,18 @@ void help_menu() {
llscreen->print_string("FBZX (4.0.0)", -1, 1, 15, 0); llscreen->print_string("FBZX (4.0.0)", -1, 1, 15, 0);
llscreen->print_string("Available keys", -1, 2, 14, 0); llscreen->print_string("Available keys", -1, 2, 14, 0);
llscreen->print_string("Shift:Caps Shift Ctrl:Symbol Shift", -1, 4, 11, 0); llscreen->print_string("Shift:Caps Shift Ctrl:Symbol Shift", -1, 4, 11, 0);
llscreen->print_string("F1: \001\017this help", 14, 6, 12, 0); llscreen->print_string("F1: \001\017this help", 14, 6, 12, 0);
llscreen->print_string("F2: \001\017manage snapshots", 336, 6, 12, 0); llscreen->print_string("F2: \001\017manage snapshots", 336, 6, 12, 0);
llscreen->print_string("F3: \001\017manage TAP/TZX", 14, 8, 12, 0); llscreen->print_string("F3: \001\017manage TAP/TZX", 14, 8, 12, 0);
llscreen->print_string("F4: \001\017change settings", 336, 8, 12, 0); llscreen->print_string("F4: \001\017change settings", 336, 8, 12, 0);
llscreen->print_string("F5: \001\017stop TAPE", 14, 10, 12, 0); llscreen->print_string("F5: \001\017stop TAPE", 14, 10, 12, 0);
llscreen->print_string("F6: \001\017play TAPE", 336, 10, 12, 0); llscreen->print_string("F6: \001\017play TAPE", 336, 10, 12, 0);
llscreen->print_string("F7: \001\017manage MICRODRIVE", 14, 12, 12, 0); llscreen->print_string("F7: \001\017manage MICRODRIVE", 14, 12, 12, 0);
llscreen->print_string("F8: \001\017tools", 336, 12, 12, 0); llscreen->print_string("F8: \001\017tools", 336, 12, 12, 0);
llscreen->print_string("F9: \001\017toggle fullscreen", 14, 14, 12, 0); llscreen->print_string("F9: \001\017toggle fullscreen", 14, 14, 12, 0);
llscreen->print_string("F10: \001\017reset spectrum", 336, 14, 12, 0); llscreen->print_string("F10: \001\017reset spectrum", 336, 14, 12, 0);
llscreen->print_string("F11/O: \001\017volume low", 14, 16, 12, 0); llscreen->print_string("F11/O: \001\017volume low", 14, 16, 12, 0);
llscreen->print_string("F12/P: \001\017volume up", 336, 16, 12, 0); llscreen->print_string("F12/P: \001\017volume up", 336, 16, 12, 0);
llscreen->print_string("ESC: \001\017exit emulator", 184, 18, 12, 0); llscreen->print_string("ESC: \001\017exit emulator", 184, 18, 12, 0);
print_copy(); print_copy();
...@@ -680,7 +667,6 @@ void taps_menu() { ...@@ -680,7 +667,6 @@ void taps_menu() {
void select_tapfile() { void select_tapfile() {
char *filename; char *filename;
int retorno;
llscreen->clear_screen(); llscreen->clear_screen();
...@@ -864,7 +850,7 @@ void select_mdrfile() { ...@@ -864,7 +850,7 @@ void select_mdrfile() {
} }
void create_mdrfile() { void create_mdrfile() {
int retorno, bucle; int retorno;
char nombre2[1024]; char nombre2[1024];
llscreen->clear_screen(); llscreen->clear_screen();
...@@ -970,7 +956,7 @@ void create_scrfile() { ...@@ -970,7 +956,7 @@ void create_scrfile() {
int ask_filename(char *nombre_final, int y_coord, string extension, char *path) { int ask_filename(char *nombre_final, int y_coord, string extension, char *path) {
int longitud, retorno; int longitud, retorno;
char nombre[37], nombre2[38]; char nombre[37], nombre2[256];
nombre[0] = CURSOR_ELEMENT; nombre[0] = CURSOR_ELEMENT;
nombre[1] = 0; nombre[1] = 0;
...@@ -1709,7 +1695,7 @@ char *select_file(string title, char *path, enum LOAD_FILE_TYPES kind) { ...@@ -1709,7 +1695,7 @@ char *select_file(string title, char *path, enum LOAD_FILE_TYPES kind) {
key = wait_key(); key = wait_key();
// Jump to the first item with the starting letters or numbers (this browsing directories with lots of files). // Jump to the first item with the starting letters or numbers (this browsing directories with lots of files).
if (key >= SDLK_a && key <= SDLK_z || key >= SDLK_0 && key <= SDLK_9) { if (((key >= SDLK_a) && (key <= SDLK_z)) || ((key >= SDLK_0) && (key <= SDLK_9))) {
saved_selected = selected; saved_selected = selected;
selected = (selected + 1) % numitems; selected = (selected + 1) % numitems;
key -= SDLK_a; key -= SDLK_a;
...@@ -1890,7 +1876,8 @@ unsigned int wait_key() { ...@@ -1890,7 +1876,8 @@ unsigned int wait_key() {
void print_files(class fichero *filelist, int from, int mark) { void print_files(class fichero *filelist, int from, int mark) {
class fichero *fl2; class fichero *fl2;
int bucle, numitems, pos; int bucle, numitems;
unsigned int pos;
char ink1, ink2; char ink1, ink2;
string namefile; string namefile;
......
...@@ -56,7 +56,6 @@ protected: ...@@ -56,7 +56,6 @@ protected:
bool read_16bit(ifstream *file, uint16_t&value) { bool read_16bit(ifstream *file, uint16_t&value) {
uint8_t data[2]; uint8_t data[2];
size_t retval;
file->read((char *) data, 2); file->read((char *) data, 2);
if (file->eof()) { if (file->eof()) {
...@@ -69,7 +68,6 @@ protected: ...@@ -69,7 +68,6 @@ protected:
bool write_16bit(ofstream *file, uint16_t value) { bool write_16bit(ofstream *file, uint16_t value) {
uint8_t data[2]; uint8_t data[2];
size_t retval;
data[0] = (uint8_t) (value % 256); data[0] = (uint8_t) (value % 256);
data[1] = (uint8_t) (value / 256); data[1] = (uint8_t) (value / 256);
...@@ -79,7 +77,6 @@ protected: ...@@ -79,7 +77,6 @@ protected:
bool read_24bit(ifstream *file, uint32_t&value) { bool read_24bit(ifstream *file, uint32_t&value) {
uint8_t data[3]; uint8_t data[3];
size_t retval;
file->read((char *) data, 3); file->read((char *) data, 3);
if (file->eof()) { if (file->eof()) {
...@@ -92,7 +89,6 @@ protected: ...@@ -92,7 +89,6 @@ protected:
bool write_24bit(ofstream *file, uint32_t value) { bool write_24bit(ofstream *file, uint32_t value) {
uint8_t data[3]; uint8_t data[3];
size_t retval;
data[0] = (uint8_t) (value % 256); data[0] = (uint8_t) (value % 256);
data[1] = (uint8_t) ((value / 256) % 256); data[1] = (uint8_t) ((value / 256) % 256);
...@@ -104,7 +100,6 @@ protected: ...@@ -104,7 +100,6 @@ protected:
bool read_string(ifstream *file, string&value) { bool read_string(ifstream *file, string&value) {
uint8_t length; uint8_t length;
char data[256]; char data[256];
size_t retval;
if (this->read_8bit(file, length)) { if (this->read_8bit(file, length)) {
return true; return true;
...@@ -121,8 +116,6 @@ protected: ...@@ -121,8 +116,6 @@ protected:
bool write_string(ofstream *file, string value) { bool write_string(ofstream *file, string value) {
uint8_t length; uint8_t length;
char data[256];
size_t retval;
length = (uint8_t) value.length(); length = (uint8_t) value.length();
if (this->write_8bit(file, length)) { if (this->write_8bit(file, length)) {
...@@ -358,7 +351,7 @@ protected: ...@@ -358,7 +351,7 @@ protected:
uint32_t loop; uint32_t loop;
bool allow_fast_load; bool allow_fast_load;
int pointer; unsigned int pointer;
enum TURBOBLOCK_states { enum TURBOBLOCK_states {
TURBOBLOCK_GUIDE, TURBOBLOCK_GUIDE,
...@@ -467,7 +460,7 @@ public: ...@@ -467,7 +460,7 @@ public:
} }
TAPBlock(uint8_t *data, uint16_t size) : FullBlock() { TAPBlock(uint8_t *data, uint16_t size) : FullBlock() {
size_t retval;
this->next = NULL; this->next = NULL;
this->data = new uint8_t[size]; this->data = new uint8_t[size];
...@@ -515,7 +508,6 @@ public: ...@@ -515,7 +508,6 @@ public:
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
uint16_t size; uint16_t size;
size_t retval;
if (this->read_16bit(file, size)) { if (this->read_16bit(file, size)) {
return true; return true;
...@@ -558,7 +550,7 @@ public: ...@@ -558,7 +550,7 @@ public:
} }
TZXBlock(uint8_t *data, uint16_t size) : FullBlock() { TZXBlock(uint8_t *data, uint16_t size) : FullBlock() {
size_t retval;
this->next = NULL; this->next = NULL;
this->data = new uint8_t[size]; this->data = new uint8_t[size];
...@@ -595,7 +587,6 @@ public: ...@@ -595,7 +587,6 @@ public:
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
uint16_t size; uint16_t size;
uint16_t pause; uint16_t pause;
size_t retval;
// read pause duration // read pause duration
if (this->read_16bit(file, pause)) { if (this->read_16bit(file, pause)) {
...@@ -702,7 +693,6 @@ public: ...@@ -702,7 +693,6 @@ public:
} }
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
size_t retval;
uint16_t pause; uint16_t pause;
// read pilot pulse duration // read pilot pulse duration
...@@ -771,7 +761,7 @@ class PureDataBlock : public TapeBlock { ...@@ -771,7 +761,7 @@ class PureDataBlock : public TapeBlock {
uint8_t bit; uint8_t bit;
uint8_t bit_counter; uint8_t bit_counter;
int pointer; unsigned int pointer;
public: public:
~PureDataBlock() { ~PureDataBlock() {
...@@ -808,8 +798,8 @@ public: ...@@ -808,8 +798,8 @@ public:
} }
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
int loop; unsigned int loop;
uint16_t lpause; uint16_t lpause;
// read pulse lengths // read pulse lengths
if (this->read_16bit(file, this->zero)) { if (this->read_16bit(file, this->zero)) {
return true; return true;
...@@ -972,7 +962,7 @@ public: ...@@ -972,7 +962,7 @@ public:
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
uint8_t loop; uint8_t loop;
uint16_t pulses[255];
// read repetitions // read repetitions
if (this->read_8bit(file, this->npulses)) { if (this->read_8bit(file, this->npulses)) {
return true; return true;
...@@ -1037,7 +1027,7 @@ public: ...@@ -1037,7 +1027,7 @@ public:
} }
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
uint16_t length;
// read pilot pulse duration // read pilot pulse duration
if (this->read_16bit(file, this->length)) { if (this->read_16bit(file, this->length)) {
return true; return true;
...@@ -1172,7 +1162,6 @@ public: ...@@ -1172,7 +1162,6 @@ public:
} }
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
size_t retval;
if (this->read_16bit(file, this->size)) { if (this->read_16bit(file, this->size)) {
return true; return true;
...@@ -1223,7 +1212,6 @@ public: ...@@ -1223,7 +1212,6 @@ public:
} }
bool load_block(ifstream *file) { bool load_block(ifstream *file) {
size_t retval;
if (this->read_8bit(file, this->size)) { if (this->read_8bit(file, this->size)) {
return true; return true;
...@@ -1330,7 +1318,6 @@ bool Tape::load_tzx(string filename) { ...@@ -1330,7 +1318,6 @@ bool Tape::load_tzx(string filename) {
ifstream * file; ifstream * file;
uint8_t block_type; uint8_t block_type;
uint8_t tmpdata[10]; uint8_t tmpdata[10];
size_t retval;
class TapeBlock *block; class TapeBlock *block;
file = new ifstream(filename.c_str(), ios::in | ios::binary); file = new ifstream(filename.c_str(), ios::in | ios::binary);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment