[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-patches] [patch #3641] Remove a compilation warning
From: |
anonymous |
Subject: |
[Wesnoth-patches] [patch #3641] Remove a compilation warning |
Date: |
Thu, 13 Jan 2005 18:52:46 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0 |
This is an automated notification sent by Savannah.
It relates to:
patch #3641, project Battle for Wesnoth
==============================================================================
LATEST MODIFICATIONS of patch #3641:
==============================================================================
Posted by: an anonymous user
Posted on: 2005-01-13 13:52 ()
_______________________________________________________
Follow-up Comment:
At first, escuse me for the absence of the patch file. I will join it.
Next, the warning was :
"
Compiler Warning (level 2) C4146 : unary minus operator applied to unsigned
type, result still unsigned
"
_______________________________________________________
Additional Item Attachment:
File name: util.hpp.patch Size:0 KB
<http://savannah.nongnu.org/patch/download.php?item_id=3641&item_file_id=4035>
==============================================================================
OVERVIEW of patch #3641:
==============================================================================
URL:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=3641>
Summary: Remove a compilation warning
Project: Battle for Wesnoth
Submitted by: redsun
Submitted on: mer 12.01.2005 à 21:44
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Replace
"
template<typename T>
inline bool is_odd(T num) { return (static_cast<unsigned int>(num > 0 ? num :
-num)&1) == 1; }
"
by
"
template<typename T>
inline bool is_odd(T num)
{
if (num >= 0)
return ((num & 1) == 1);
else
return ((-static_cast<int>(num) & 1) == 1);
}
"
in util.hpp line 34
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: jeu 13.01.2005 à 13:52 By: Anonymous
At first, escuse me for the absence of the patch file. I will join it.
Next, the warning was :
"
Compiler Warning (level 2) C4146 : unary minus operator applied to unsigned
type, result still unsigned
"
-------------------------------------------------------
Date: jeu 13.01.2005 à 03:13 By: Guillaume Melquiond <silene>
Hum... Can you tell us which warning it was? (the precise and complete
message). Especially necessary since the new code you propose is semantically
different from the old one.
As a side note, what you are submitting are not patches but bug-reports. A
patch is the result of the command "diff -u" (or even simpler for you if you
have wesnoth cvs repository: "cvs diff -u"), and hence can be automagically
applied to the code.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: jeu 13.01.2005 à 13:52 Name: util.hpp.patch Size: 725o By: None
<http://savannah.nongnu.org/patch/download.php?item_id=3641&item_file_id=4035>
==============================================================================
This item URL is:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=3641>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/