all: misc cleanups

This commit is contained in:
Markus F.X.J. Oberhumer 2022-10-20 00:31:02 +02:00
parent 13276d93fa
commit 07d368adca
14 changed files with 28 additions and 58 deletions

View File

@ -1,19 +1,8 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "devel4" ]
branches: [ "devel", "devel4", "devel5", "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "devel4" ]
@ -34,40 +23,16 @@ jobs:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
with: { submodules: true }
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@ -10,7 +10,9 @@
CMAKE = cmake
UPX_CMAKE_BUILD_FLAGS += --parallel
#UPX_CMAKE_BUILD_FLAGS += --verbose
ifneq ($(VERBOSE),)
UPX_CMAKE_BUILD_FLAGS += --verbose
endif
# check git submodules
ifeq ($(wildcard ./vendor/doctest/doctest/.),)

View File

@ -52,7 +52,7 @@ Copyright (c) 1996-2022 Markus Oberhumer, Laszlo Molnar & John Reiser
- excellent compression ratio: typically compresses better than Zip,
use UPX to decrease the size of your distribution !
- very fast decompression: more than 1000 MB/sec on any reasonably modern
- very fast decompression: more than 500 MB/sec on any reasonably modern
machine
- no memory overhead for your compressed executables for most of the

View File

@ -40,7 +40,7 @@ DESCRIPTION
- excellent compression ratio: typically compresses better than Zip,
use UPX to decrease the size of your distribution !
- very fast decompression: more than 1000 MB/sec on any reasonably modern
- very fast decompression: more than 500 MB/sec on any reasonably modern
machine
- no memory overhead for your compressed executables for most of the

View File

@ -181,7 +181,7 @@ Use \fB\s-1UPX\s0\fR on trusted files only!
\& \- excellent compression ratio: typically compresses better than Zip,
\& use UPX to decrease the size of your distribution !
\&
\& \- very fast decompression: more than 1000 MB/sec on any reasonably modern
\& \- very fast decompression: more than 500 MB/sec on any reasonably modern
\& machine
\&
\& \- no memory overhead for your compressed executables for most of the

View File

@ -55,7 +55,7 @@ B<UPX> is a versatile executable packer with the following features:
- excellent compression ratio: typically compresses better than Zip,
use UPX to decrease the size of your distribution !
- very fast decompression: more than 1000 MB/sec on any reasonably modern
- very fast decompression: more than 500 MB/sec on any reasonably modern
machine
- no memory overhead for your compressed executables for most of the

View File

@ -31,6 +31,7 @@
/*************************************************************************
// BoundedPtr
// (deprecated, use xspan.h instead)
**************************************************************************/
template <class T>

View File

@ -37,7 +37,7 @@ template <class T>
class MemBufferBase {
public:
typedef T element_type;
typedef T *pointer;
typedef typename std::add_pointer<T>::type pointer;
protected:
pointer b = nullptr;
@ -124,15 +124,17 @@ private:
// raw_bytes overload
template <class T>
inline T *raw_bytes(const MemBufferBase<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes);
inline typename MemBufferBase<T>::pointer raw_bytes(const MemBufferBase<T> &mbb,
size_t size_in_bytes) {
return mbb.raw_bytes(size_in_bytes);
}
// global operators
// rewrite "n + membuffer" to "membuffer + n" so that this will get checked above
template <class U, class /*Dummy*/ = typename std::enable_if<std::is_integral<U>::value, U>::type>
typename MemBuffer::pointer operator+(U n, const MemBuffer &mb) {
return mb + n;
template <class T, class U,
class /*Dummy*/ = typename std::enable_if<std::is_integral<U>::value, U>::type>
inline typename MemBufferBase<T>::pointer operator+(U n, const MemBufferBase<T> &mbb) {
return mbb + n;
}
/* vim:set ts=4 sw=4 et: */

View File

@ -192,13 +192,14 @@ template <class T>
struct Ptr;
template <class T>
inline T *raw_bytes(const PtrOrSpanOrNull<T> &a, size_t size_in_bytes);
inline typename PtrOrSpanOrNull<T>::pointer raw_bytes(const PtrOrSpanOrNull<T> &a,
size_t size_in_bytes);
template <class T>
inline T *raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes);
inline typename PtrOrSpan<T>::pointer raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes);
template <class T>
inline T *raw_bytes(const Span<T> &a, size_t size_in_bytes);
inline typename Span<T>::pointer raw_bytes(const Span<T> &a, size_t size_in_bytes);
template <class T>
inline T *raw_bytes(const Ptr<T> &a, size_t size_in_bytes);
inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes);
class SpanInternalDummyArg; // not implemented

View File

@ -31,8 +31,7 @@
public:
typedef T element_type;
typedef typename std::add_lvalue_reference<T>::type reference;
// typedef typename std::add_pointer<T>::type pointer;
typedef T *pointer;
typedef typename std::add_pointer<T>::type pointer;
typedef size_t size_type;
// befriend all

View File

@ -45,7 +45,6 @@ public:
typedef T element_type;
typedef typename std::add_lvalue_reference<T>::type reference;
// typedef T *pointer;
typedef typename std::add_pointer<T>::type pointer;
private:
@ -194,7 +193,7 @@ public: // raw access
// raw_bytes overload
template <class T>
inline T *raw_bytes(const Ptr<T> &a, size_t size_in_bytes) {
inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes);
}

View File

@ -92,7 +92,8 @@ public:
// raw_bytes overload
template <class T>
inline T *raw_bytes(const PtrOrSpanOrNull<T> &a, size_t size_in_bytes) {
inline typename PtrOrSpanOrNull<T>::pointer raw_bytes(const PtrOrSpanOrNull<T> &a,
size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes);
}

View File

@ -119,7 +119,7 @@ public:
// raw_bytes overload
template <class T>
inline T *raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes) {
inline typename PtrOrSpan<T>::pointer raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes);
}

View File

@ -119,7 +119,7 @@ public:
// raw_bytes overload
template <class T>
inline T *raw_bytes(const Span<T> &a, size_t size_in_bytes) {
inline typename Span<T>::pointer raw_bytes(const Span<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes);
}