summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-01 18:49:22 +0200
committerTor Andersson <tor@ghostscript.com>2010-07-01 18:49:22 +0200
commit74838f16f6c838251af1e8b81a6064a9cac50464 (patch)
tree0f4bbda6c9266c3df8071cd37cb258510adfd6dd /fitz
parent7f940ad522ceb63bc5d54923a1635773ca592b9b (diff)
downloadmupdf-74838f16f6c838251af1e8b81a6064a9cac50464.tar.xz
Remove silly warnings from MSVC.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/filt_faxd.c2
-rw-r--r--fitz/fitz_base.h4
-rw-r--r--fitz/util_gettimeofday.c20
3 files changed, 6 insertions, 20 deletions
diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c
index 61238819..c31a7ea2 100644
--- a/fitz/filt_faxd.c
+++ b/fitz/filt_faxd.c
@@ -538,7 +538,7 @@ eol:
else {
unsigned char * restrict d = out->wp;
unsigned char * restrict s = fax->dst;
- unsigned w = fax->stride;
+ int w = fax->stride;
for (i = 0; i < w; i++)
*d++ = *s++ ^ 0xff;
}
diff --git a/fitz/fitz_base.h b/fitz/fitz_base.h
index c3b1f4a2..ec1eb9fc 100644
--- a/fitz/fitz_base.h
+++ b/fitz/fitz_base.h
@@ -35,6 +35,10 @@
#ifdef _MSC_VER /* stupid stone-age compiler */
+#pragma warning( disable: 4244 ) /* conversion from X to Y, possible loss of data */
+#pragma warning( disable: 4996 ) /* The POSIX name for this item is deprecated */
+#pragma warning( disable: 4996 ) /* This function or variable may be unsafe */
+
#include <io.h>
extern int gettimeofday(struct timeval *tv, struct timezone *tz);
diff --git a/fitz/util_gettimeofday.c b/fitz/util_gettimeofday.c
index c016902e..ee89d445 100644
--- a/fitz/util_gettimeofday.c
+++ b/fitz/util_gettimeofday.c
@@ -10,19 +10,12 @@
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
-struct timezone
-{
- int tz_minuteswest; /* minutes W of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
int gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
unsigned __int64 tmpres = 0;
- static int tzflag = 0;
- if (NULL != tv)
+ if (tv)
{
GetSystemTimeAsFileTime(&ft);
@@ -37,17 +30,6 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
tv->tv_usec = (long)(tmpres % 1000000UL);
}
- if (NULL != tz)
- {
- if (!tzflag)
- {
- _tzset();
- tzflag++;
- }
- tz->tz_minuteswest = _timezone / 60;
- tz->tz_dsttime = _daylight;
- }
-
return 0;
}