mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Compiler Warning (level 3) CS0675 in DefalteManager.cs #55
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @haykpetros on GitHub (Aug 3, 2015).
When building SharpCompress project with Warning level above 2 (usually 4 is default) it will fail on lines 683 and 695 of DeflateManager.cs:
I believe following line:
can be replaced using following code instead:
@adamhathcock commented on GitHub (Aug 3, 2015):
Thanks for this, could you make this a Pull Request by chance?
@haykpetros commented on GitHub (Aug 4, 2015):
It seems that this might be a bug in Visual Studio 2015, so we are going to wait until it is verified.
@Gachl commented on GitHub (Sep 15, 2015):
Considering that there's a wdc in MSDN about this I doubt this is a bug.
@benshoof commented on GitHub (Dec 15, 2015):
It's never a bug in the compiler... except this time. Even worse, a commit has been made to SharpCompress that tried to fix this but instead broke the build on VS2013 with a legitimate case of the warning it tried to prevent.
The deflate code is from DotNetZip from 2009 and has been working without any compiler saying peep until VS2015 showed up and threw CS0675. This change in compiler behavior is a bug: https://github.com/dotnet/roslyn/issues/4027
About a month ago, pull request https://github.com/adamhathcock/sharpcompress/pull/101 containing
18bd810228changed the deflate code in what looks like an attempt to satisfy VS2015. Unfortunately it creates a real case of CS0675 that VS2013 does catch so right now the build is broken on VS2013.I've created pull request https://github.com/adamhathcock/sharpcompress/pull/104 that reverts
18bd810228and disables CS0675 warnings on Defalte.send_bits().