Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lelmarir committed Oct 15, 2015
1 parent 192061b commit 8a9fec6
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 21 deletions.
1 change: 1 addition & 0 deletions CmisSync.Lib/Cmis/CmisUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ public static string GetProperty(IDocument document, string id)
/// <returns></returns>
public static string GetChangeLogToken(ISession session)
{
//FIXME: should not clear cache!
session.Clear(); // Clear all caches.
session.Binding.GetRepositoryService().GetRepositoryInfos(null);
string token = session.Binding.GetRepositoryService().GetRepositoryInfo(session.RepositoryInfo.Id, null).LatestChangeLogToken;
Expand Down
4 changes: 2 additions & 2 deletions CmisSync.Lib/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public Config(string fullPath)
{
Load();
}
catch (Exception e) {
catch (Exception) {
throw;
}
}
Expand Down Expand Up @@ -520,7 +520,7 @@ public override RemoteRepository Repository {
}
}

public virtual string Path {
public override string Path {
get {
return String.Empty;
}
Expand Down
4 changes: 2 additions & 2 deletions CmisSync.Lib/ConfigMigration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void Migrate()
int configSchemaVersion = ConfigManager.CurrentConfig.ConfigSchemaVersion;

// Skip migration if up-to-date.
if (configSchemaVersion == null || configSchemaVersion >= Config.SchemaVersion)
if (configSchemaVersion >= Config.SchemaVersion)
{
return;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ private static bool IsAlfresco42OrLater(CmisSync.Lib.Config.SyncConfig.SyncFolde

return true;
}
catch (Exception e)
catch (Exception)
{
return false;
}
Expand Down
1 change: 0 additions & 1 deletion CmisSync.Lib/Database/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ public void SetChangeLogToken(string token)
}

const string RemotePathPrefixKey = "RemotePathPrefix";
private Config.SyncConfig.SyncFolder repoinfo;

/// <summary>
/// Checks whether the database contains a given folders's id.
Expand Down
16 changes: 4 additions & 12 deletions CmisSync.Lib/Sync/SyncFolderSyncronizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,11 @@ private void deleteLocalFiles()
Dispose(false);
}

/// <summary>
/// Implement IDisposable interface.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
/// Dispose pattern implementation.
/// </summary>
protected void Dispose(bool disposing)
{
protected override void Dispose(bool disposing)
{
if (!this.disposed)
{
if (disposing)
Expand All @@ -174,6 +165,7 @@ protected void Dispose(bool disposing)
}
this.disposed = true;
}
base.Dispose(disposing);
}

/// <summary>
Expand Down Expand Up @@ -312,7 +304,7 @@ private IFolder tryGetObjectByPath(string remoteFolderPath, int tries)
{
return (IFolder)getSession().GetObjectByPath(remoteFolderPath);
}
catch (CmisBaseException e)
catch (CmisBaseException)
{
//maybe a temporary error, retry
tries--;
Expand Down
2 changes: 1 addition & 1 deletion CmisSync.Lib/Sync/SyncFolderSyncronizerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public void Dispose()
/// <summary>
/// Dispose pattern implementation.
/// </summary>
protected void Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
{
if (!this.disposed)
{
Expand Down
2 changes: 1 addition & 1 deletion CmisSync.Lib/XmlUri.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void WriteXml(XmlWriter writer)
/// <summary>
/// String representation of the URI.
/// </summary>
public string ToString()
public override string ToString()
{
return _value.ToString();
}
Expand Down
4 changes: 4 additions & 0 deletions CmisSync/CmisSync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<NuGetPackageImportStamp>79528698</NuGetPackageImportStamp>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -77,6 +78,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\cmissync-app.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="AvalonWizard, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AvalonWizard.1.2.0\lib\net40\AvalonWizard.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion CmisSync/ViewModels/AccountViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void save(Window window)
}
ConfigManager.CurrentConfig.Save();
window.Close();
}catch(Exception e){
}catch(Exception){
MessageBox.Show("Unable to obtain the corrct url or wrong credentials.", "Error");
}
}
Expand Down
2 changes: 1 addition & 1 deletion Extras/OpenDataSpaceDotCMIS

0 comments on commit 8a9fec6

Please sign in to comment.