[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lynx-dev] HTTCP.c warning [PATCH]
From: |
Doug Kaufman |
Subject: |
[Lynx-dev] HTTCP.c warning [PATCH] |
Date: |
Wed, 26 Jul 2006 14:37:42 -0700 (PDT) |
When compiling for MingW with warnings turned on, I noticed that
there is one item it the code that sets off the gcc warning that
"dereferncing of type-punned pointer will break strict-aliasing
rules". In the past I had the -fno-strict-aliasing flag included in my
CFLAGS, but it would probably be better to fix the code. As you know,
I am not a programmer. Is this the proper fix, or should something
else be done? It does make the warning go away.
Doug
--- lynx2.8.6dev.18/WWW/Library/Implementation/HTTCP.c.ori 2006-05-29
15:44:54.000000000 -0700
+++ lynx2.8.6dev.18/WWW/Library/Implementation/HTTCP.c 2006-07-26
14:16:50.000000000 -0700
@@ -1150,7 +1150,7 @@
WSASetLastError(WSAHOST_NOT_FOUND);
hThread = CreateThread(NULL, 4096UL, _fork_func, host, 0UL,
- (unsigned long *) &dwThreadID);
+ (unsigned long *)(void *) &dwThreadID);
if (!hThread)
MessageBox(NULL, "CreateThread",
"CreateThread Failed", 0L);
--
Doug Kaufman
Internet: address@hidden
- [Lynx-dev] HTTCP.c warning [PATCH],
Doug Kaufman <=