mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Clean up some compiler warnings
This commit is contained in:
@@ -52,7 +52,6 @@ bool hasEnding(std::wstring const& fullString, std::wstring const& ending)
|
|||||||
void unzipSingleFile(BYTE* zipBuf, DWORD cZipBuf, wstring fileLocation, std::function<bool(ZIPENTRY&)>& predicate)
|
void unzipSingleFile(BYTE* zipBuf, DWORD cZipBuf, wstring fileLocation, std::function<bool(ZIPENTRY&)>& predicate)
|
||||||
{
|
{
|
||||||
HZIP zipFile = OpenZip(zipBuf, cZipBuf, NULL);
|
HZIP zipFile = OpenZip(zipBuf, cZipBuf, NULL);
|
||||||
//SetUnzipBaseDir(zipFile, targetDir);
|
|
||||||
|
|
||||||
bool unzipSuccess = false;
|
bool unzipSuccess = false;
|
||||||
|
|
||||||
@@ -60,8 +59,6 @@ void unzipSingleFile(BYTE* zipBuf, DWORD cZipBuf, wstring fileLocation, std::fun
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
do {
|
do {
|
||||||
ZIPENTRY zentry;
|
ZIPENTRY zentry;
|
||||||
wchar_t targetFile[MAX_PATH];
|
|
||||||
|
|
||||||
zr = GetZipItem(zipFile, index, &zentry);
|
zr = GetZipItem(zipFile, index, &zentry);
|
||||||
if (zr != ZR_OK && zr != ZR_MORE) {
|
if (zr != ZR_OK && zr != ZR_MORE) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1650,16 +1650,16 @@ uInt* v) // working area: values in order of bit length
|
|||||||
uInt f; // i repeats in table every f entries
|
uInt f; // i repeats in table every f entries
|
||||||
int g; // maximum code length
|
int g; // maximum code length
|
||||||
int h; // table level
|
int h; // table level
|
||||||
register uInt i; // counter, current code
|
/*register*/ uInt i; // counter, current code
|
||||||
register uInt j; // counter
|
/*register*/ uInt j; // counter
|
||||||
register int k; // number of bits in current code
|
/*register*/ int k; // number of bits in current code
|
||||||
int l; // bits per table (returned in m)
|
int l; // bits per table (returned in m)
|
||||||
uInt mask; // (1 << w) - 1, to avoid cc -O bug on HP
|
uInt mask; // (1 << w) - 1, to avoid cc -O bug on HP
|
||||||
register uInt* p; // pointer into c[], b[], or v[]
|
/*register*/ uInt* p; // pointer into c[], b[], or v[]
|
||||||
inflate_huft* q; // points to current table
|
inflate_huft* q; // points to current table
|
||||||
struct inflate_huft_s r; // table entry for structure assignment
|
struct inflate_huft_s r; // table entry for structure assignment
|
||||||
inflate_huft* u[BMAX]; // table stack
|
inflate_huft* u[BMAX]; // table stack
|
||||||
register int w; // bits before this table == (l * h)
|
/*register*/ int w; // bits before this table == (l * h)
|
||||||
uInt x[BMAX + 1]; // bit offsets, then code stack
|
uInt x[BMAX + 1]; // bit offsets, then code stack
|
||||||
uInt* xp; // pointer into x
|
uInt* xp; // pointer into x
|
||||||
int y; // number of dummy codes added
|
int y; // number of dummy codes added
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<PublishTrimmed>true</PublishTrimmed>
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||||
|
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace SquirrelCli.Sources
|
|||||||
|
|
||||||
private static string GetSHA1Checksum(byte[] bytes)
|
private static string GetSHA1Checksum(byte[] bytes)
|
||||||
{
|
{
|
||||||
var sha = new System.Security.Cryptography.SHA1Managed();
|
var sha = System.Security.Cryptography.SHA1.Create();
|
||||||
byte[] checksum = sha.ComputeHash(bytes);
|
byte[] checksum = sha.ComputeHash(bytes);
|
||||||
return BitConverter.ToString(checksum).Replace("-", String.Empty);
|
return BitConverter.ToString(checksum).Replace("-", String.Empty);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ std::wstring FindLatestAppDir()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma warning( disable : 4244 ) // warning - conversion from 'wchar_t' to 'const _Elem', possible loss of data
|
||||||
std::string s(appVer.begin(), appVer.end());
|
std::string s(appVer.begin(), appVer.end());
|
||||||
|
|
||||||
version::Semver200_version thisVer(s);
|
version::Semver200_version thisVer(s);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<Title>Squirrel.Tests</Title>
|
<Title>Squirrel.Tests</Title>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTest>true</IsTest>
|
<IsTest>true</IsTest>
|
||||||
<NoWarn>CS1998</NoWarn>
|
<NoWarn>CS1998,xUnit2015,xUnit2017,xUnit2005,xUnit2009,xUnit2013,xUnit2004</NoWarn>
|
||||||
<SignAssembly>True</SignAssembly>
|
<SignAssembly>True</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>..\Squirrel.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>..\Squirrel.snk</AssemblyOriginatorKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user