Browse Source

Fixed multiple benign warnings

core
Teknikode 4 years ago
parent
commit
6047903ee6
  1. 2
      GitService/MysqlDatabase.cs
  2. 2
      Logging/Logger.cs
  3. 2
      MailService/MysqlDatabase.cs
  4. 2
      Piwik/Reporting.cs
  5. 2
      Piwik/Tracking.cs
  6. 2
      Teknik/Areas/Admin/Controllers/AdminController.cs
  7. 2
      Teknik/Areas/Podcast/Views/Podcast/Comments.cshtml
  8. 2
      Teknik/Areas/Podcast/Views/Podcast/Podcasts.cshtml
  9. 4
      Teknik/Areas/User/Controllers/UserController.cs
  10. 2
      Teknik/Filters/TrackDownload.cs
  11. 2
      Teknik/Filters/TrackLink.cs
  12. 2
      Teknik/Filters/TrackPageView.cs
  13. 2
      Teknik/Security/TeknikPrincipal.cs
  14. 4
      Teknik/Teknik.csproj
  15. 2
      Utilities/Cryptography/PGP.cs
  16. 2
      Utilities/MysqlDatabase.cs
  17. 2
      Utilities/ResponseHelper.cs

2
GitService/MysqlDatabase.cs

@ -134,7 +134,7 @@ namespace Teknik.GitService @@ -134,7 +134,7 @@ namespace Teknik.GitService
Connection.Open();
Connected = true;
}
catch (MySqlException ex)
catch (MySqlException)
{
Connected = false;
}

2
Logging/Logger.cs

@ -154,7 +154,7 @@ namespace Teknik.Logging @@ -154,7 +154,7 @@ namespace Teknik.Logging
client.Send(mail);
}
catch (Exception ex) { /* don't handle something in the handler */
catch (Exception) { /* don't handle something in the handler */
}
}
}

2
MailService/MysqlDatabase.cs

@ -134,7 +134,7 @@ namespace Teknik.MailService @@ -134,7 +134,7 @@ namespace Teknik.MailService
Connection.Open();
Connected = true;
}
catch (MySqlException ex)
catch (MySqlException)
{
Connected = false;
}

2
Piwik/Reporting.cs

@ -85,7 +85,7 @@ namespace Teknik.Piwik @@ -85,7 +85,7 @@ namespace Teknik.Piwik
//}
}
}
catch (Exception ex)
catch (Exception)
{
}

2
Piwik/Tracking.cs

@ -45,7 +45,7 @@ namespace Teknik.Piwik @@ -45,7 +45,7 @@ namespace Teknik.Piwik
//tracker.doTrackPageView(string.Format("{0}/{1}", sub, title));
}
}
catch (Exception ex)
catch (Exception)
{
}

2
Teknik/Areas/Admin/Controllers/AdminController.cs

@ -87,7 +87,7 @@ namespace Teknik.Areas.Admin.Controllers @@ -87,7 +87,7 @@ namespace Teknik.Areas.Admin.Controllers
model.LastSeen = UserHelper.GetLastAccountActivity(_dbContext, _config, user);
models.Add(model);
}
catch (Exception ex)
catch (Exception)
{
// Skip this result
}

2
Teknik/Areas/Podcast/Views/Podcast/Comments.cshtml

@ -2,5 +2,5 @@ @@ -2,5 +2,5 @@
@foreach (var comment in Model)
{
@Html.Partial("Comment", comment)
@await Html.PartialAsync("Comment", comment)
}

2
Teknik/Areas/Podcast/Views/Podcast/Podcasts.cshtml

@ -2,5 +2,5 @@ @@ -2,5 +2,5 @@
@foreach (var podcast in Model)
{
@Html.Partial("Podcast", podcast)
@await Html.PartialAsync("Podcast", podcast)
}

4
Teknik/Areas/User/Controllers/UserController.cs

@ -742,7 +742,7 @@ namespace Teknik.Areas.Users.Controllers @@ -742,7 +742,7 @@ namespace Teknik.Areas.Users.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Delete()
public async Task<IActionResult> Delete()
{
if (ModelState.IsValid)
{
@ -753,7 +753,7 @@ namespace Teknik.Areas.Users.Controllers @@ -753,7 +753,7 @@ namespace Teknik.Areas.Users.Controllers
{
UserHelper.DeleteAccount(_dbContext, _config, user);
// Sign Out
Logout();
await Logout();
return Json(new { result = true });
}
}

2
Teknik/Filters/TrackDownload.cs

@ -15,8 +15,6 @@ namespace Teknik.Filters @@ -15,8 +15,6 @@ namespace Teknik.Filters
{
public class TrackDownload : ActionFilterAttribute
{
private readonly Config _config;
public TrackDownload()
{
//_config = config;

2
Teknik/Filters/TrackLink.cs

@ -15,8 +15,6 @@ namespace Teknik.Filters @@ -15,8 +15,6 @@ namespace Teknik.Filters
{
public class TrackLink : ActionFilterAttribute
{
private readonly Config _config;
public TrackLink()
{
//_config = config;

2
Teknik/Filters/TrackPageView.cs

@ -15,8 +15,6 @@ namespace Teknik.Filters @@ -15,8 +15,6 @@ namespace Teknik.Filters
{
public class TrackPageView : ActionFilterAttribute
{
private readonly Config _config;
public TrackPageView()
{
}

2
Teknik/Security/TeknikPrincipal.cs

@ -22,7 +22,7 @@ namespace Teknik.Security @@ -22,7 +22,7 @@ namespace Teknik.Security
}
}
private User m_Info;
private User m_Info = null;
public User Info
{
get

4
Teknik/Teknik.csproj

@ -45,7 +45,6 @@ @@ -45,7 +45,6 @@
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.1.0-preview1-final" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" />
</ItemGroup>
@ -70,8 +69,7 @@ @@ -70,8 +69,7 @@
<Folder Include="Data\Migrations\" />
<Folder Include="Migrations\" />
<Folder Include="Views\Shared\" />
<Folder Include="wwwroot\images\" />
<Folder Include="wwwroot\lib\" />
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>

2
Utilities/Cryptography/PGP.cs

@ -29,7 +29,7 @@ namespace Teknik.Utilities.Cryptography @@ -29,7 +29,7 @@ namespace Teknik.Utilities.Cryptography
}
}
}
catch (Exception ex)
catch (Exception)
{
isValid = false;
}

2
Utilities/MysqlDatabase.cs

@ -134,7 +134,7 @@ namespace Teknik.Utilities @@ -134,7 +134,7 @@ namespace Teknik.Utilities
Connection.Open();
Connected = true;
}
catch (MySqlException ex)
catch (MySqlException)
{
Connected = false;
}

2
Utilities/ResponseHelper.cs

@ -46,7 +46,7 @@ namespace Teknik.Utilities @@ -46,7 +46,7 @@ namespace Teknik.Utilities
}
while (processedBytes > 0 && bytesRemaining > 0);
}
catch (Exception ex)
catch (Exception)
{
// Don't worry about it. Just leave
await response.Body.FlushAsync();

Loading…
Cancel
Save