View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002152 | OpenFOAM | Patch | public | 2016-07-15 11:16 | 2016-07-15 11:46 |
Reporter | wyldckat | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0002152: "uint.H" has an inconsistent definition, when cross-checking with "uintIO.C" | ||||
Description | The file "src/OpenFOAM/primitives/ints/uint/uint.H" has this declaration: uint readUint(Istream&); while "uintIO.C" defines it as: unsigned int Foam::readUint(Istream& is) This is an inconsistency, given that some systems will either not have a definition for "uint" or may have another different definition from "unsigned int". Attached is the file that fixes this in "uint.H", by using "unsigned int" instead of "uint". | ||||
Additional Information | This is a bit bias on my part, given that I'm currently working on porting the OpenFOAM-dev master branch to Windows and "uint" is undefined with the standard definitions that are inherited from "uint32.H" in the current stack that I'm using. Nonetheless, an explicit usage of "unsigned int" makes a bit more sense, in case there are more systems that simply don't have "uint" defined or have a simply have a different definition. | ||||
Tags | No tags attached. | ||||
|
uint.H (2,555 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Primitive uint Description System uinteger SourceFiles uintIO.C \*---------------------------------------------------------------------------*/ #ifndef uint_H #define uint_H #include "uint32.H" #include "uint64.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { #define MAXMIN(retType, type1, type2) \ \ inline retType max(const type1 s1, const type2 s2) \ { \ return (s1 > s2)? s1: s2; \ } \ \ inline retType min(const type1 s1, const type2 s2) \ { \ return (s1 < s2)? s1: s2; \ } MAXMIN(uint8_t, uint8_t, uint8_t) MAXMIN(uint16_t, uint16_t, uint16_t) MAXMIN(uint32_t, uint32_t, uint32_t) MAXMIN(uint64_t, uint64_t, uint32_t) MAXMIN(uint64_t, uint32_t, uint64_t) MAXMIN(uint64_t, uint64_t, uint64_t) // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // unsigned int readUint(Istream&); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* // |
|
Resolved by commit f4a588d421348a8cfb5a744e71d604e1661b5194 |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-07-15 11:16 | wyldckat | New Issue | |
2016-07-15 11:16 | wyldckat | Status | new => assigned |
2016-07-15 11:16 | wyldckat | Assigned To | => henry |
2016-07-15 11:16 | wyldckat | File Added: uint.H | |
2016-07-15 11:46 | henry | Note Added: 0006531 | |
2016-07-15 11:46 | henry | Status | assigned => resolved |
2016-07-15 11:46 | henry | Fixed in Version | => dev |
2016-07-15 11:46 | henry | Resolution | open => fixed |