all: clang-tidy updates
This commit is contained in:
+7
-6
@@ -26,9 +26,10 @@
|
||||
*/
|
||||
|
||||
#include "conf.h"
|
||||
#include "packmast.h"
|
||||
#include "packer.h"
|
||||
#include "compress/compress.h" // upx_ucl_version_string()
|
||||
// for list_all_packers():
|
||||
#include "packer.h"
|
||||
#include "packmast.h" // PackMaster::visitAllPackers
|
||||
|
||||
/*************************************************************************
|
||||
// header
|
||||
@@ -89,7 +90,7 @@ void show_usage(void) {
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
// util
|
||||
// list_all_packers()
|
||||
**************************************************************************/
|
||||
|
||||
namespace {
|
||||
@@ -121,8 +122,9 @@ struct PackerNames {
|
||||
return strcmp(((const Entry *) a)->sname, ((const Entry *) b)->sname);
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
static void show_all_packers(FILE *f, int verbose) {
|
||||
static void list_all_packers(FILE *f, int verbose) {
|
||||
Options o;
|
||||
o.reset();
|
||||
PackerNames pn;
|
||||
@@ -152,7 +154,6 @@ static void show_all_packers(FILE *f, int verbose) {
|
||||
if (verbose <= 0 && pn.names_count)
|
||||
con_fprintf(f, "\n");
|
||||
}
|
||||
} // namespace
|
||||
|
||||
/*************************************************************************
|
||||
// help
|
||||
@@ -291,7 +292,7 @@ void show_help(int verbose) {
|
||||
fg = con_fg(f, FG_YELLOW);
|
||||
con_fprintf(f, "\nThis version supports:\n");
|
||||
fg = con_fg(f, fg);
|
||||
show_all_packers(f, verbose);
|
||||
list_all_packers(f, verbose);
|
||||
} else {
|
||||
con_fprintf(f, "\nType '%s --help' for more detailed help.\n", progname);
|
||||
}
|
||||
|
||||
+5
-1
@@ -60,12 +60,14 @@ static constexpr unsigned MAX_ELF_HDR_64 = 1024;
|
||||
static unsigned const EF_ARM_EABI_VER4 = 0x04000000;
|
||||
static unsigned const EF_ARM_EABI_VER5 = 0x05000000;
|
||||
|
||||
unsigned char PackLinuxElf::o_shstrtab[] = { \
|
||||
/*static*/ const unsigned char PackLinuxElf::o_shstrtab[] = { \
|
||||
/*start*/ '\0',
|
||||
/*offset 1*/ '.','n','o','t','e','.','g','n','u','.','b','u','i','l','d','-','i','d','\0',
|
||||
/*offset 20*/ '.','s','h','s','t','r','t','a','b','\0'
|
||||
};
|
||||
|
||||
// NOLINTBEGIN(clang-analyzer-*)
|
||||
|
||||
static unsigned
|
||||
umin(unsigned a, unsigned b)
|
||||
{
|
||||
@@ -8487,4 +8489,6 @@ void PackLinuxElf::unpack(OutputFile * /*fo*/)
|
||||
throwCantUnpack("internal error");
|
||||
}
|
||||
|
||||
// NOLINTEND(clang-analyzer-*)
|
||||
|
||||
/* vim:set ts=4 sw=4 et: */
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ protected:
|
||||
MemBuffer note_body; // concatenated contents of PT_NOTEs, if any
|
||||
unsigned note_size; // total size of PT_NOTEs
|
||||
int o_elf_shnum; // num output Shdrs
|
||||
static unsigned char o_shstrtab[];
|
||||
static const unsigned char o_shstrtab[];
|
||||
};
|
||||
|
||||
class PackLinuxElf32 : public PackLinuxElf
|
||||
|
||||
+2
-1
@@ -79,6 +79,7 @@ struct UiPacker::State {
|
||||
#endif
|
||||
};
|
||||
|
||||
// static
|
||||
unsigned UiPacker::total_files = 0;
|
||||
unsigned UiPacker::total_files_done = 0;
|
||||
upx_uint64_t UiPacker::total_c_len = 0;
|
||||
@@ -155,7 +156,7 @@ static const char *mkline(upx_uint64_t fu_len, upx_uint64_t fc_len, upx_uint64_t
|
||||
//
|
||||
**************************************************************************/
|
||||
|
||||
UiPacker::UiPacker(const Packer *p_) : ui_pass(0), ui_total_passes(0), p(p_), s(nullptr) {
|
||||
UiPacker::UiPacker(const Packer *p_) : p(p_) {
|
||||
static upx_std_once_flag init_done;
|
||||
upx_std_call_once(init_done, init_global_constants);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void printInfo(int nl = 0);
|
||||
const Packer *p = nullptr;
|
||||
const Packer *const p;
|
||||
|
||||
// callback
|
||||
upx_callback_t cb = {};
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "conf.h"
|
||||
#include "file.h"
|
||||
#include "packmast.h"
|
||||
#include "packer.h"
|
||||
#include "ui.h"
|
||||
|
||||
#if (ACC_OS_DOS32) && defined(__DJGPP__)
|
||||
|
||||
Reference in New Issue
Block a user