Обсуждение: PG compilation error with Visual Studio 2015/2017/2019

Поиск
Список
Период
Сортировка

PG compilation error with Visual Studio 2015/2017/2019

От
Ranier Vilela
Дата:
>>I m still working on testing this patch. If anyone has Idea please suggest.
I still see problems with this patch.

1. Variable loct have redundant initialization, it would be enough to declare so: _locale_t loct;
2. Style white space in variable rc declaration.
3. Style variable cp_index can be reduced.
if (tmp != NULL) {
   size_t cp_index;

cp_index = (size_t)(tmp - winlocname);
strncpy(loc_name, winlocname, cp_index);
loc_name[cp_index] = '\0';
4. Memory leak if _WIN32_WINNT >= 0x0600 is true, _free_locale(loct); is not called.
5. Why call _create_locale if _WIN32_WINNT >= 0x0600 is true and loct is not used?

regards,
Ranier Vilela