Commit c8a0f234 authored by Martin Ruckert's avatar Martin Ruckert
Browse files

removing remaining compiler warnings

parent e03c93ef
......@@ -10,22 +10,23 @@ MMIXDIR = ../../../mmixware/trunk
# where to install files
INSTALLDIR = ../../../../html
MMIXWAREBIN= mmix mmmix mmixal mmotype
MMIXWAREEXE= mmix.exe mmmix.exe mmixal.exe mmotype.exe
all: bin doc
bin: mmoimg
bin:
echo use visual studio to build the files
doc:
echo no documents here
install: bin
for file in $(MMIXWAREBIN); do \
cp $$file.exe $(INSTALLDIR)/exe ; \
for file in $(MMIXWAREEXE); do \
cp Release/$$file $(INSTALLDIR)/exe ; \
done
# to make the directory ready for visual studio
ready:
for file in ctangle cweave ctie; do \
cp $(INSTALLDIR)/exe/$$file.exe . ; \
for file in ctangle.exe cweave.exe ctie.exe; do \
cp $(INSTALLDIR)/exe/$$file . ; \
done
cp $(MMIXDIR)/*.w .
\ No newline at end of file
......@@ -24,6 +24,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="ctangle abstime.w abstime.c"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -88,6 +89,9 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Generate abstime.h"
CommandLine="Debug\abstime.exe &gt; abstime.h"
/>
</Configuration>
<Configuration
......@@ -165,6 +169,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
Description="Generate abstime.h"
CommandLine="Release\abstime &gt; abstime.h"
/>
</Configuration>
......@@ -181,6 +186,10 @@
RelativePath=".\abstime.c"
>
</File>
<File
RelativePath=".\abstime.w"
>
</File>
</Filter>
<Filter
Name="Header Files"
......
@x
@x
#ifndef SEEK_END
#define SEEK_END 2
#endif
@y
#endif
@y
#ifndef SEEK_END
#define SEEK_END 2
#endif
#pragma warning(disable : 4996 )
@z
#endif
#pragma warning(disable : 4996 )
@z
fread returns size_t
@x
n=fread(buf,1,size.l,sfile[handle].fp);
@y
n=(unsigned int)fread(buf,1,size.l,sfile[handle].fp);
@z
\ No newline at end of file
......@@ -25,7 +25,7 @@
<Tool
Name="VCPreBuildEventTool"
Description="build c files"
CommandLine="ctangle mmix-sim.w sim-win.ch mmix-sim.c&#x0D;&#x0A;ctangle mmix-arith.w arith-win.ch mmix-arith.c&#x0D;&#x0A;ctangle mmix-io.w mmix-io.c&#x0D;&#x0A;"
CommandLine="ctangle mmix-sim.w sim-win.ch mmix-sim.c&#x0D;&#x0A;ctangle mmix-arith.w arith-win.ch mmix-arith.c&#x0D;&#x0A;ctangle mmix-io.w io-win.ch mmix-io.c&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -106,7 +106,7 @@
<Tool
Name="VCPreBuildEventTool"
Description="build c files"
CommandLine="ctangle mmix-sim.w sim-win.ch mmix-sim.c&#x0D;&#x0A;ctangle mmix-arith.w arith-win.ch mmix-arith.c&#x0D;&#x0A;ctangle mmix-io.w mmix-io.c&#x0D;&#x0A;"
CommandLine="ctangle mmix-sim.w sim-win.ch mmix-sim.c&#x0D;&#x0A;ctangle mmix-arith.w arith-win.ch mmix-arith.c&#x0D;&#x0A;ctangle mmix-io.w io-win.ch mmix-io.c&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -187,6 +187,10 @@
RelativePath=".\arith-win.ch"
>
</File>
<File
RelativePath=".\io-win.ch"
>
</File>
<File
RelativePath=".\mmix-arith.c"
>
......
......@@ -13,9 +13,6 @@
/>
</Platforms>
<ToolFiles>
<ToolFile
RelativePath=".\Tangle.rules"
/>
</ToolFiles>
<Configurations>
<Configuration
......@@ -27,15 +24,12 @@
>
<Tool
Name="VCPreBuildEventTool"
Description=""
CommandLine=""
Description="Build mmixal.c"
CommandLine="ctangle mmixal.w mmixal.c"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="Tangle"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
......@@ -114,9 +108,6 @@
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="Tangle"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
......
To remove warning C4996: ... was declared deprecated
@x
#include <stdio.h>
@y
#pragma warning(disable : 4996 )
#include <stdio.h>
@z
......@@ -25,7 +25,7 @@
<Tool
Name="VCPreBuildEventTool"
Description="build mmix-pipe.c "
CommandLine="ctangle mmix-config.w mmix-config.c&#x0D;&#x0A;ctangle mmix-pipe.w mmix-pipe.c&#x0D;&#x0A;ctangle mmix-mem.w mmix-mem.c&#x0D;&#x0A;ctangle mmmix.w mmmix.c&#x0D;&#x0A;"
CommandLine="ctangle mmix-config.w config-win.ch mmix-config.c&#x0D;&#x0A;ctangle mmix-pipe.w pipe-win.ch mmix-pipe.c&#x0D;&#x0A;ctangle mmix-mem.w mmix-mem.c&#x0D;&#x0A;ctangle mmmix.w mmmix-win.ch mmmix.c&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -106,7 +106,7 @@
<Tool
Name="VCPreBuildEventTool"
Description="build mmix-pipe.c "
CommandLine="ctangle mmix-config.w mmix-config.c&#x0D;&#x0A;ctangle mmix-pipe.w mmix-pipe.c&#x0D;&#x0A;ctangle mmix-mem.w mmix-mem.c&#x0D;&#x0A;ctangle mmmix.w mmmix.c&#x0D;&#x0A;"
CommandLine="ctangle mmix-config.w config-win.ch mmix-config.c&#x0D;&#x0A;ctangle mmix-pipe.w pipe-win.ch mmix-pipe.c&#x0D;&#x0A;ctangle mmix-mem.w mmix-mem.c&#x0D;&#x0A;ctangle mmmix.w mmmix-win.ch mmmix.c&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -183,6 +183,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\config-win.ch"
>
</File>
<File
RelativePath=".\io-win.ch"
>
</File>
<File
RelativePath=".\mmix-arith.c"
>
......@@ -211,6 +219,10 @@
RelativePath=".\mmmix.c"
>
</File>
<File
RelativePath=".\pipe-win.ch"
>
</File>
</Filter>
<Filter
Name="Header Files"
......
......@@ -24,6 +24,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="build mmotype.c"
CommandLine="ctangle mmotype.w mmotype.c"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -180,6 +182,10 @@
RelativePath=".\mmotype.c"
>
</File>
<File
RelativePath=".\mmotype.w"
>
</File>
</Filter>
<Filter
Name="Header Files"
......
To remove warnings C4244: conversion from '__w64 int' to 'int',
possible loss of data
when doing pointer arithmetic
@x
#ifdef __STDC__
#define ARGS(list) list
#else
#define ARGS(list) ()
#endif
@y
#ifdef __STDC__
#define ARGS(list) list
#else
#define ARGS(list) ()
#endif
#pragma warning(disable : 4244 )
@z
For a tetra t, -t is still an unsigned number so we replace the following statements
@x
new_O=incr(cool_O,-x-1);
@y
new_O=incr(cool_O,-(int)x-1);
@z
max is already defined
@x
@d max(x,y) ((x)<(y)? (y):(x))
@y
@z
@x
data->y.o.l &= -data->b.o.l;
@y
data->y.o.l &= -(int)data->b.o.l;
@z
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