Source: oss4
Version: 4.2-build2006-2
Severity: normal
Tags: patch

On x86_64, unsigned long long and unsigned long have the same size,
but Linux requires status flag variables to have type unsigned long.
The current definition results in warning such as:

build/core/oss_core.c: In function 'oss_fp_check':
build/core/oss_core.c:1862:3: warning: comparison of distinct pointer types 
lacks a cast [enabled by default]

Ben.

-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
From: Ben Hutchings <b...@decadent.org.uk>
Subject: Fix definition of oss_native_word for Linux

On x86_64, unsigned long long and unsigned long have the same size,
but Linux requires status flag variables to have type unsigned long.
The current definition results in warning such as:

build/core/oss_core.c: In function 'oss_fp_check':
build/core/oss_core.c:1862:3: warning: comparison of distinct pointer types lacks a cast [enabled by default]

---
--- a/kernel/OS/Linux/wrapper/wrap.h
+++ b/kernel/OS/Linux/wrapper/wrap.h
@@ -21,12 +21,7 @@
 /*
  * Some integer types
  */
-#if defined(__x86_64__)
-typedef unsigned long long oss_native_word;	/* Same as the address and status register size */
-#else
-typedef unsigned long oss_native_word;	/* Same as the address and status register size */
-#endif
-typedef long long oss_int64_t;			/* Signed 64 bit integer */
+typedef unsigned long oss_native_word;	/* Same as the address and status registtypedef long long oss_int64_t;			/* Signed 64 bit integer */
 typedef unsigned long long oss_uint64_t;	/* Unsigned 64 bit integer */
 
 extern char *oss_strcpy (char *s1, const char *s2);

Reply via email to