[misc] minor update to pollock

* Also reinstate CodeQL since github/codeql-action#850 is supposed to be fixed.
* Also fix a false Coverity warning.
This commit is contained in:
Pete Batard 2022-06-23 13:59:21 +01:00
parent a0d669232c
commit d0844bfc70
No known key found for this signature in database
GPG Key ID: 38E0CF5E69EDD671
6 changed files with 30 additions and 15 deletions

View File

@ -1,4 +1,3 @@
# Disabled on account of https://github.com/github/codeql-action/issues/850
name: "CodeQL"
on:
@ -21,10 +20,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: cpp
@ -37,4 +36,4 @@ jobs:
run: msbuild ${{env.SOLUTION_FILE_PATH}} /m /p:Configuration=${{ env.BUILD_CONFIGURATION}},Platform=${{ env.TARGET_PLATFORM }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

View File

@ -1,7 +1,7 @@
/*
* Rufus: The Reliable USB Formatting Utility
* Poedit <-> rufus.loc conversion utility
* Copyright © 2018-2019 Pete Batard <pete@akeo.ie>
* Copyright © 2018-2022 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -41,9 +41,9 @@ using System.Windows.Forms;
[assembly: AssemblyDescription("Poedit ↔ Rufus loc conversion utility")]
[assembly: AssemblyCompany("Akeo Consulting")]
[assembly: AssemblyProduct("Pollock")]
[assembly: AssemblyCopyright("Copyright © 2018 Pete Batard <pete@akeo.ie>")]
[assembly: AssemblyCopyright("Copyright © 2018-2022 Pete Batard <pete@akeo.ie>")]
[assembly: AssemblyTrademark("GNU GPLv3")]
[assembly: AssemblyVersion("1.3.*")]
[assembly: AssemblyVersion("1.4.*")]
namespace pollock
{
@ -266,8 +266,16 @@ namespace pollock
}
lang.sections[section_name].Add(new Message(parts[1], parts[2]));
// We also maintain global list of Id -> str for convenience
lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]);
last_key = parts[1];
try
{
lang.id_to_str.Add(new Id(section_name, (parts[1])), parts[2]);
}
catch (Exception e)
{
Console.WriteLine($"Error for {parts[1]}: " + e.Message);
continue;
}
last_key = parts[1];
if (comment != null)
{
id = new Id(section_name, last_key);

View File

@ -8,9 +8,10 @@
<OutputType>Exe</OutputType>
<RootNamespace>pollock</RootNamespace>
<AssemblyName>pollock</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -51,6 +52,9 @@
<ItemGroup>
<Content Include="pollock.ico" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="PostBuildMacros">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

View File

@ -1272,6 +1272,7 @@ static char* CreateUnattendXml(int arch, int mask)
if (arch < ARCH_X86_32 || arch >= ARCH_ARM_64 || mask == 0)
return NULL;
arch--;
// coverity[swapped_arguments]
if (GetTempFileNameU(temp_dir, APPLICATION_NAME, 0, path) == 0)
return NULL;
fd = fopen(path, "w");

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.19.1900"
CAPTION "Rufus 3.19.1901"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -395,8 +395,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,19,1900,0
PRODUCTVERSION 3,19,1900,0
FILEVERSION 3,19,1901,0
PRODUCTVERSION 3,19,1901,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.19.1900"
VALUE "FileVersion", "3.19.1901"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.19.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.19.1900"
VALUE "ProductVersion", "3.19.1901"
END
END
BLOCK "VarFileInfo"