Hi! On Sun, Feb 14, 2010 at 02:15, Andre Poenitz <andre.poen...@mathematik.tu-chemnitz.de> wrote: >> 2. src/support/debug.h: DEBUG is defined as DEBUG = (1 << 31) >> what is out of range for enum (32 bit) and I guess should be DEBUG >> = (1 << 30) as there is no 30, yet. > > 1 << 31 is within the 32 bit range.
mmh, yeah, you are right. Why does the compiler complain then? Error: lyx::Debug::Type is not within the range of a long or unsigned long. I will ask on the Sun side... >> 3. a forgotten static_cast in src/support/FileName.cpp > - munmap(mm, info.st_size); > + munmap(static_cast<char *>(mm), info.st_size); > > This seems to be Solaris-specific. So a configure check might be needed > (unless we decide an #ifdef is fine...) seems like it will be defined as extern int munmap ( caddr_t , size_t ) ; when using C++ - at least here. Man page says int munmap(void *addr, size_t len); but that maybe true for C, not C++. Configure check may be ok, but configure tends to check with $CC instead of $CXX, as I have seen... > > docstring indent; > if (ind < 0) { > - indent.insert(0, -ind, ' '); > + indent.insert(static_cast<unsigned>(0), -ind, ' '); > > This looks strange. Why is that needed? Is the compiler confused by overloads? > If so, '0u' might look a bit better than 'static_cast<unsigned>(0)' "lstrings.cpp", line 953: Error: Overloading ambiguity between "std::wstring::insert(wchar_t*, unsigned, wchar_t)" and "std::wstring::insert(unsigned, unsigned, wchar_t)". "lstrings.cpp", line 956: Error: Overloading ambiguity between "std::wstring::insert(wchar_t*, unsigned, wchar_t)" and "std::wstring::insert(unsigned, unsigned, wchar_t)". But yes - 0u is the better way ;) Bye...Frank