Re: GLib and 64-bit Windows
- From: Jake Goulding <goulding vivisimo com>
- To: GTK Devel List <gtk-devel-list gnome org>
- Cc: Tor Lillqvist <tml iki fi>, Hans Breuer <hans breuer org>
- Subject: Re: GLib and 64-bit Windows
- Date: Fri, 02 Mar 2007 22:22:39 -0500
Here is the full list of warnings from the glib directory. Please let me
know if you agree with my sorting into two groups.
Needs to be fixed:
warning C4028: formal parameter 2 different from declaration
warning C4113: 'GCond *(__cdecl *)()' differs in parameter lists from
'GCond *(__cdecl *)(void)'
warning C4113: 'GMutex *(__cdecl *)()' differs in parameter lists from
'GMutex *(__cdecl *)(void)'
warning C4133: 'function' : incompatible types - from 'glong *' to
'const time_t *'
warning C4146: unary minus operator applied to unsigned type, result
still unsigned
warning C4267: '=' : conversion from 'size_t' to 'gint', possible loss
of data
warning C4267: '=' : conversion from 'size_t' to 'glong', possible loss
of data
warning C4267: '=' : conversion from 'size_t' to 'guint', possible loss
of data
warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of
data
warning C4267: 'function' : conversion from 'size_t' to 'guint',
possible loss of data
warning C4267: 'function' : conversion from 'size_t' to 'gulong',
possible loss of data
warning C4267: 'function' : conversion from 'size_t' to 'unsigned int',
possible loss of data
warning C4267: 'initializing' : conversion from 'size_t' to 'const
gint', possible loss of data
warning C4267: 'initializing' : conversion from 'size_t' to 'gint',
possible loss of data
warning C4311: 'type cast' : pointer truncation from 'ChunkLink *' to
'guint'
warning C4311: 'type cast' : pointer truncation from 'GPid' to 'int'
warning C4311: 'type cast' : pointer truncation from 'HANDLE' to 'gint'
warning C4311: 'type cast' : pointer truncation from 'HANDLE' to 'guint'
warning C4311: 'type cast' : pointer truncation from 'HANDLE' to 'int'
warning C4311: 'type cast' : pointer truncation from 'HWND' to 'guint'
warning C4311: 'type cast' : pointer truncation from 'const void *' to
'guint'
warning C4311: 'type cast' : pointer truncation from 'gconstpointer' to
'guint'
warning C4311: 'type cast' : pointer truncation from 'gpointer' to 'guint'
warning C4311: 'type cast' : pointer truncation from 'gpointer' to 'gulong'
warning C4311: 'type cast' : pointer truncation from 'guint8 *' to 'glong'
warning C4334: '<<' : result of 32-bit shift implicitly converted to 64
bits (was 64-bit shift intended?)
warning C4715: 'g_io_win32_check' : not all control paths return a value
Doesn't need to be fixed(?):
warning C4005: 'min' : macro redefinition
warning C4018: '<' : signed/unsigned mismatch
warning C4018: '<=' : signed/unsigned mismatch
warning C4018: '>' : signed/unsigned mismatch
warning C4018: '>=' : signed/unsigned mismatch
warning C4090: 'function' : different 'const' qualifiers
warning C4312: 'type cast' : conversion from 'GQuark' to 'gpointer' of
greater size
warning C4312: 'type cast' : conversion from 'gint' to 'HANDLE' of
greater size
warning C4312: 'type cast' : conversion from 'guint' to 'HWND' of
greater size
warning C4312: 'type cast' : conversion from 'guint' to 'gpointer' of
greater size
warning C4312: 'type cast' : conversion from 'gunichar' to 'gpointer' of
greater size
warning C4312: 'type cast' : conversion from 'int' to 'GPid' of greater size
warning C4312: 'type cast' : conversion from 'int' to 'HANDLE' of
greater size
Hans Breuer wrote:
On 02.03.2007 22:49, Jake Goulding wrote:
On 02.03.2007 22:29, Tor Lillqvist wrote:
The tests don't necessarily test everything, but this does indeed
sound promising.
Well, I didn't say that I *did* run them and get good outputs, I just
wanted to make sure that was what the expected behavior was. :-)
However, I have run the majority of them. Unfortunately there are a few
that require inputs and I am clueless as to what they need to run.
Most have passed, but spawn-test seems to freak out on me. I am checking
to see if I can figure that out.
There may be trouble with the process id passed between lib and
spawn-helper. The GPid definition was added with win64 in mind but not
tested at that time. It probably needs to be an int64 there.
There are whole piles of warnings about signed/unsigned comparisons and
type size issues:
warning C4311: 'type cast' : pointer truncation from 'gpointer' to 'long'
You should probably look at these.
warning C4018: '<' : signed/unsigned mismatch
these are not win64 specific and probably harmless
warning C4267: 'function' : conversion from 'size_t' to 'gssize',
possible loss of data
Sounds like a bug in your configuration. IIRC gssize should match the size
of size_t, both 64 bits in this case.
warning C4090: 'initializing' : different 'const' qualifiers
could be ignored unless there is something supicious in its area.
I'm not sure which warnings are ignorable, and which are not.
Personally, I'm quite pedantic about my own code, and like to fix
everything, but I know that's not always feasible.
I think a series of patches to fix these warnings would be gladly accepted.
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
--
JAKE GOULDING
Software Engineer
goulding vivisimo com
Viv�imo [Search Done Right�]
1710 Murray Avenue
Pittsburgh, PA 15217 USA
tel: +1.412.422.2499 x105
fax: +1.412.422.2495
vivisimo.com clusty.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]