mirror of https://github.com/upx/upx.git
all: misc cleanups
This commit is contained in:
parent
13276d93fa
commit
07d368adca
|
@ -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"
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "devel4" ]
|
branches: [ "devel", "devel4", "devel5", "master" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ "devel4" ]
|
branches: [ "devel4" ]
|
||||||
|
@ -34,40 +23,16 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'cpp' ]
|
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:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with: { submodules: true }
|
with: { submodules: true }
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
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
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
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
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
CMAKE = cmake
|
CMAKE = cmake
|
||||||
UPX_CMAKE_BUILD_FLAGS += --parallel
|
UPX_CMAKE_BUILD_FLAGS += --parallel
|
||||||
#UPX_CMAKE_BUILD_FLAGS += --verbose
|
ifneq ($(VERBOSE),)
|
||||||
|
UPX_CMAKE_BUILD_FLAGS += --verbose
|
||||||
|
endif
|
||||||
|
|
||||||
# check git submodules
|
# check git submodules
|
||||||
ifeq ($(wildcard ./vendor/doctest/doctest/.),)
|
ifeq ($(wildcard ./vendor/doctest/doctest/.),)
|
||||||
|
|
|
@ -52,7 +52,7 @@ Copyright (c) 1996-2022 Markus Oberhumer, Laszlo Molnar & John Reiser
|
||||||
- excellent compression ratio: typically compresses better than Zip,
|
- excellent compression ratio: typically compresses better than Zip,
|
||||||
use UPX to decrease the size of your distribution !
|
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
|
machine
|
||||||
|
|
||||||
- no memory overhead for your compressed executables for most of the
|
- no memory overhead for your compressed executables for most of the
|
||||||
|
|
|
@ -40,7 +40,7 @@ DESCRIPTION
|
||||||
- excellent compression ratio: typically compresses better than Zip,
|
- excellent compression ratio: typically compresses better than Zip,
|
||||||
use UPX to decrease the size of your distribution !
|
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
|
machine
|
||||||
|
|
||||||
- no memory overhead for your compressed executables for most of the
|
- no memory overhead for your compressed executables for most of the
|
||||||
|
|
|
@ -181,7 +181,7 @@ Use \fB\s-1UPX\s0\fR on trusted files only!
|
||||||
\& \- excellent compression ratio: typically compresses better than Zip,
|
\& \- excellent compression ratio: typically compresses better than Zip,
|
||||||
\& use UPX to decrease the size of your distribution !
|
\& 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
|
\& machine
|
||||||
\&
|
\&
|
||||||
\& \- no memory overhead for your compressed executables for most of the
|
\& \- no memory overhead for your compressed executables for most of the
|
||||||
|
|
|
@ -55,7 +55,7 @@ B<UPX> is a versatile executable packer with the following features:
|
||||||
- excellent compression ratio: typically compresses better than Zip,
|
- excellent compression ratio: typically compresses better than Zip,
|
||||||
use UPX to decrease the size of your distribution !
|
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
|
machine
|
||||||
|
|
||||||
- no memory overhead for your compressed executables for most of the
|
- no memory overhead for your compressed executables for most of the
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
// BoundedPtr
|
// BoundedPtr
|
||||||
|
// (deprecated, use xspan.h instead)
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -37,7 +37,7 @@ template <class T>
|
||||||
class MemBufferBase {
|
class MemBufferBase {
|
||||||
public:
|
public:
|
||||||
typedef T element_type;
|
typedef T element_type;
|
||||||
typedef T *pointer;
|
typedef typename std::add_pointer<T>::type pointer;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
pointer b = nullptr;
|
pointer b = nullptr;
|
||||||
|
@ -124,15 +124,17 @@ private:
|
||||||
|
|
||||||
// raw_bytes overload
|
// raw_bytes overload
|
||||||
template <class T>
|
template <class T>
|
||||||
inline T *raw_bytes(const MemBufferBase<T> &a, size_t size_in_bytes) {
|
inline typename MemBufferBase<T>::pointer raw_bytes(const MemBufferBase<T> &mbb,
|
||||||
return a.raw_bytes(size_in_bytes);
|
size_t size_in_bytes) {
|
||||||
|
return mbb.raw_bytes(size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// global operators
|
// global operators
|
||||||
// rewrite "n + membuffer" to "membuffer + n" so that this will get checked above
|
// 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>
|
template <class T, class U,
|
||||||
typename MemBuffer::pointer operator+(U n, const MemBuffer &mb) {
|
class /*Dummy*/ = typename std::enable_if<std::is_integral<U>::value, U>::type>
|
||||||
return mb + n;
|
inline typename MemBufferBase<T>::pointer operator+(U n, const MemBufferBase<T> &mbb) {
|
||||||
|
return mbb + n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set ts=4 sw=4 et: */
|
/* vim:set ts=4 sw=4 et: */
|
||||||
|
|
|
@ -192,13 +192,14 @@ template <class T>
|
||||||
struct Ptr;
|
struct Ptr;
|
||||||
|
|
||||||
template <class T>
|
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>
|
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>
|
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>
|
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
|
class SpanInternalDummyArg; // not implemented
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,7 @@
|
||||||
public:
|
public:
|
||||||
typedef T element_type;
|
typedef T element_type;
|
||||||
typedef typename std::add_lvalue_reference<T>::type reference;
|
typedef typename std::add_lvalue_reference<T>::type reference;
|
||||||
// typedef typename std::add_pointer<T>::type pointer;
|
typedef typename std::add_pointer<T>::type pointer;
|
||||||
typedef T *pointer;
|
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
|
|
||||||
// befriend all
|
// befriend all
|
||||||
|
|
|
@ -45,7 +45,6 @@ public:
|
||||||
|
|
||||||
typedef T element_type;
|
typedef T element_type;
|
||||||
typedef typename std::add_lvalue_reference<T>::type reference;
|
typedef typename std::add_lvalue_reference<T>::type reference;
|
||||||
// typedef T *pointer;
|
|
||||||
typedef typename std::add_pointer<T>::type pointer;
|
typedef typename std::add_pointer<T>::type pointer;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -194,7 +193,7 @@ public: // raw access
|
||||||
|
|
||||||
// raw_bytes overload
|
// raw_bytes overload
|
||||||
template <class T>
|
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);
|
return a.raw_bytes(size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,8 @@ public:
|
||||||
|
|
||||||
// raw_bytes overload
|
// raw_bytes overload
|
||||||
template <class T>
|
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);
|
return a.raw_bytes(size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
|
|
||||||
// raw_bytes overload
|
// raw_bytes overload
|
||||||
template <class T>
|
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);
|
return a.raw_bytes(size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
|
|
||||||
// raw_bytes overload
|
// raw_bytes overload
|
||||||
template <class T>
|
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);
|
return a.raw_bytes(size_in_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue