mirror of
https://github.com/simh/simh.git
synced 2026-02-27 17:13:44 +00:00
AltairZ80: Fix warnings in m68kfpu.c.
This commit is contained in:
committed by
Mark Pizzolato
parent
49670d60d6
commit
1e5ea3bd75
@@ -1,8 +1,7 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
extern void exit(int);
|
||||
#include <stdlib.h>
|
||||
|
||||
static void fatalerror(const char *format, ...) {
|
||||
va_list ap;
|
||||
@@ -128,7 +127,9 @@ static inline floatx80 load_pack_float80(uint32 ea)
|
||||
*ch++ = (char)(((dw1 >> 16) & 0xf) + '0');
|
||||
*ch = '\0';
|
||||
|
||||
sscanf(str, "%le", &tmp);
|
||||
if (sscanf(str, "%le", &tmp) == 1) {
|
||||
result = double_to_fx80(tmp);
|
||||
}
|
||||
|
||||
result = double_to_fx80(tmp);
|
||||
|
||||
@@ -596,7 +597,7 @@ static uint64 READ_EA_64(int ea)
|
||||
|
||||
static floatx80 READ_EA_FPE(int mode, int reg, uint32 di_mode_ea)
|
||||
{
|
||||
floatx80 fpr;
|
||||
floatx80 fpr = { 0 };
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
@@ -659,7 +660,7 @@ static floatx80 READ_EA_FPE(int mode, int reg, uint32 di_mode_ea)
|
||||
|
||||
static floatx80 READ_EA_PACK(int ea)
|
||||
{
|
||||
floatx80 fpr;
|
||||
floatx80 fpr = { 0 };
|
||||
int mode = (ea >> 3) & 0x7;
|
||||
int reg = (ea & 0x7);
|
||||
|
||||
@@ -1052,7 +1053,7 @@ static void fpgen_rm_reg(uint16 w2)
|
||||
int src = (w2 >> 10) & 0x7;
|
||||
int dst = (w2 >> 7) & 0x7;
|
||||
int opmode = w2 & 0x7f;
|
||||
floatx80 source;
|
||||
floatx80 source = { 0 };
|
||||
|
||||
// fmovecr #$f, fp0 f200 5c0f
|
||||
|
||||
|
||||
Reference in New Issue
Block a user