Skip to content

Commit

Permalink
fixed valgrind warnings 003
Browse files Browse the repository at this point in the history
  • Loading branch information
ThKattanek committed Jul 15, 2023
1 parent 02177e9 commit 117eff3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/debugger_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Dieser Sourcecode ist Copyright geschützt! //
// Geistiges Eigentum von Th.Kattanek //
// //
// www.emu64.de //
// https://github.com/ThKattanek/emu64 //
// //
//////////////////////////////////////////////////

Expand Down Expand Up @@ -355,7 +355,7 @@ void DebuggerWindow::UpdateRegister()
{
if(c64 == nullptr) return;

char str00[1024];
char str00[1024] = "";

if(current_source > 0)
{
Expand Down
57 changes: 28 additions & 29 deletions src/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// Dieser Sourcecode ist Copyright geschützt! //
// Geistiges Eigentum von Th.Kattanek //
// //
// Letzte Änderung am 20.06.2023 //
// www.emu64.de //
// https://github.com/ThKattanek/emu64 //
// //
//////////////////////////////////////////////////

Expand Down Expand Up @@ -107,37 +106,37 @@ typedef enum KeyStatus

struct REG_STRUCT
{
uint8_t reg_mask;
uint16_t pc;
uint8_t ac;
uint8_t xr;
uint8_t yr;
uint8_t sp;
uint8_t sr;
uint16_t irq;
uint16_t nmi;
uint16_t _0314;
uint16_t _0318;
uint8_t reg_mask = 0;
uint16_t pc = 0;
uint8_t ac = 0;
uint8_t xr = 0;
uint8_t yr = 0;
uint8_t sp = 0;
uint8_t sr = 0;
uint16_t irq = 0;
uint16_t nmi = 0;
uint16_t _0314 = 0;
uint16_t _0318 = 0;
};

struct IREG_STRUCT
{
uint8_t pointer;
uint16_t address;
uint16_t branch_address;
uint16_t current_opcode_pc;
uint16_t current_opcode;
uint8_t current_micro_code;
uint8_t tmp_byte;
bool irq;
bool nmi;
bool rdy;
bool reset;
bool cpu_wait;
bool jam_flag;
uint32_t cycle_counter;
bool exrom;
bool game;
uint8_t pointer = 0;
uint16_t address = 0;
uint16_t branch_address = 0;
uint16_t current_opcode_pc = 0;
uint16_t current_opcode = 0;
uint8_t current_micro_code = 0;
uint8_t tmp_byte = 0;
bool irq = false;
bool nmi = false;
bool rdy = false;
bool reset = false;
bool cpu_wait = false;
bool jam_flag = false;
uint32_t cycle_counter = 0;
bool exrom = false;
bool game = false;
};

struct VIC_STRUCT
Expand Down
7 changes: 5 additions & 2 deletions src/widget_floppy_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// Dieser Sourcecode ist Copyright geschützt! //
// Geistiges Eigentum von Th.Kattanek //
// //
// Letzte Änderung am 12.03.2022 //
// www.emu64.de //
// https://github.com/ThKattanek/emu64 //
// //
//////////////////////////////////////////////////

Expand All @@ -30,6 +29,10 @@ WidgetFloppyStatus::WidgetFloppyStatus(QWidget *parent, int floppy_nr, Floppy154
{
FloppyNr = floppy_nr;
floppy = _floppy;

old_Sektor = 255;
old_Spur = 255;

ui->setupUi(this);

QFontDatabase fontDB;
Expand Down
7 changes: 3 additions & 4 deletions src/widget_floppy_status.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// Dieser Sourcecode ist Copyright geschützt! //
// Geistiges Eigentum von Th.Kattanek //
// //
// Letzte Änderung am 12.03.2022 //
// www.emu64.de //
// https://github.com/ThKattanek/emu64 //
// //
//////////////////////////////////////////////////

Expand Down Expand Up @@ -83,8 +82,8 @@ private slots:
bool MotorLED;
bool RWLED;

unsigned char old_Sektor;
unsigned char old_Spur;
uint8_t old_Sektor;
uint8_t old_Spur;

QString AktFileName;
};
Expand Down

0 comments on commit 117eff3

Please sign in to comment.