Skip to content

Conversation

@cjee21
Copy link
Contributor

@cjee21 cjee21 commented Jan 30, 2025

Resolve warnings from Visual Studio Code analysis as well as set C++20 standard and Level 3 warnings for MSVC2022 project since it can now build with zero warnings using these settings.

Resolved warnings:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Warning	C26495	Variable 'ZenLib::GetAllFileNames_Private::FindFileDataW' is uninitialized. Always initialize a member variable (type.6).	ZenLib	Dir.cpp	538		
Warning	C26495	Variable 'ZenLib::GetAllFileNames_Private::Options' is uninitialized. Always initialize a member variable (type.6).	ZenLib	Dir.cpp	538		
Warning	C6387	'Gmt' could be '0':  this does not adhere to the specification for the function 'strftime'. 	ZenLib	Format\Http\Http_Cookies.cpp	103		
Warning	C26495	Variable 'ZenLib::InfoMap::Max' is uninitialized. Always initialize a member variable (type.6).	ZenLib	InfoMap.cpp	40		
Warning	C6258	Using TerminateThread does not allow proper thread clean up.	ZenLib	Thread.cpp	307		
Warning	C26495	Variable 'ZenLib::Translation::Max' is uninitialized. Always initialize a member variable (type.6).	ZenLib	Translation.cpp	36		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	ZenLib	Ztring.cpp	1658		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	ZenLib	Ztring.cpp	1662		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	ZenLib	Ztring.cpp	1666		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	ZenLib	Ztring.cpp	1670		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	ZenLib	Ztring.cpp	1674		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	1870		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	1908		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	1946		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	1984		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	2022		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	2060		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	2098		
Warning	C26813	Use 'bitwise and' to check if a flag is set.	ZenLib	Ztring.cpp	2136		
Warning	C26495	Variable 'ZenLib::ZtringList::Max' is uninitialized. Always initialize a member variable (type.6).	ZenLib	ZtringList.cpp	49		
Warning	C26495	Variable 'ZenLib::BitStream::BufferUnderRun_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::Buffer_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::Buffer_Size_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte_Size_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	33		
Warning	C26495	Variable 'ZenLib::BitStream::BufferUnderRun_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26495	Variable 'ZenLib::BitStream::Buffer_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26495	Variable 'ZenLib::BitStream::Buffer_Size_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26495	Variable 'ZenLib::BitStream::LastByte_Size_BookMark' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream.h	38		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	101		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	105		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	109		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	194		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	197		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream.h	200		
Warning	C26495	Variable 'ZenLib::BitStream_Fast::LastByte' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream_Fast.h	33		
Warning	C26495	Variable 'ZenLib::BitStream_Fast::LastByte' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream_Fast.h	36		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	185		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	187		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	191		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	361		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	364		
Warning	C26819	Unannotated fallthrough between switch labels (es.78).	MediaInfoLib	BitStream_Fast.h	369		
Warning	C26495	Variable 'ZenLib::BitStream_LE::ptr_BeforeLastCall' is uninitialized. Always initialize a member variable (type.6).	MediaInfoLib	BitStream_LE.h	29		

@cjee21 cjee21 changed the title Fixes Resolve warnings from Visual Studio Code analysis + Set C++20 standard and Level 3 warnings for MSVC2022 Jan 30, 2025
@JeromeMartinez
Copy link
Member

Following MediaArea/MediaInfoLib#2179 (comment), please remove the stdcpp20 stuff from this PR, it should not block this PR focus on compiler warnings, and the stdcpp20 stuff will go in a new PR when it is ready.

@cjee21
Copy link
Contributor Author

cjee21 commented Feb 9, 2025

Following MediaArea/MediaInfoLib#2179 (comment), please remove the stdcpp20 stuff from this PR, it should not block this PR focus on compiler warnings, and the stdcpp20 stuff will go in a new PR when it is ready.

ZenLib has no issues with C++20 or C++17. C++17 is needed for fall-through annotations. Do you still want to remove the stdcpp20 from this PR?

@JeromeMartinez
Copy link
Member

Do you still want to remove the stdcpp20 from this PR?

No.

@JeromeMartinez JeromeMartinez merged commit 8753466 into MediaArea:master Feb 9, 2025
3 checks passed
@cjee21 cjee21 deleted the fixes branch February 9, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants