enable compiler warnings
This commit is contained in:
parent
a6dd9dfa88
commit
662c86234f
@ -7,25 +7,9 @@ option(BLOCKY_STATIC OFF)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(BLOCKY_C_FLAGS
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
||||
-Wall -Werror -pedantic-errors -Wextra -Wconversion -Wsign-conversion>
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||
-Wno-overloaded-virtual>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:
|
||||
/W4 /WX>
|
||||
)
|
||||
set(BLOCKY_CXX_FLAGS
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
||||
-Wall -Werror -pedantic-errors -Wextra -Wconversion -Wsign-conversion>
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||
-Wno-overloaded-virtual>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:
|
||||
/W4 /WX>
|
||||
)
|
||||
|
||||
add_subdirectory(thirdparty)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BLKY_CXX_FLAGS} -I ${PROJECT_SOURCE_DIR}")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -pedantic-errors -Wextra")
|
||||
add_subdirectory(conv)
|
||||
add_subdirectory(gen)
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <codec/api/wels/codec_api.h>
|
||||
|
||||
#include "conv/common.hh"
|
||||
#include "common.hh"
|
||||
|
||||
|
||||
namespace param {
|
||||
@ -139,7 +139,7 @@ static void Exec() {
|
||||
}, &srcst, srcsz);
|
||||
|
||||
// find video track
|
||||
int ti;
|
||||
size_t ti;
|
||||
for (ti = 0; ti < dem.track_count; ++ti) {
|
||||
const auto& t = dem.track[ti];
|
||||
if (t.handler_type == MP4D_HANDLER_TYPE_VIDE) {
|
||||
|
@ -67,7 +67,6 @@ struct Frame {
|
||||
U.resize(hw*hh);
|
||||
V.resize(hw*hh);
|
||||
for (int32_t y = 0; y < hh; ++y) {
|
||||
const auto offset = y*uvstride;
|
||||
const auto srcu = yuv[1] + y*uvstride;
|
||||
const auto srcv = yuv[2] + y*uvstride;
|
||||
const auto dstu = U.data() + y*hw;
|
||||
|
@ -21,10 +21,10 @@ ValueFlag<std::string> smap {
|
||||
parser, "path", "step map file path", {"smap"},
|
||||
};
|
||||
|
||||
ValueFlag<size_t> first {
|
||||
ValueFlag<uint32_t> first {
|
||||
parser, "0", "first fcode", {"first"}, 0
|
||||
};
|
||||
ValueFlag<size_t> fcnum {
|
||||
ValueFlag<uint32_t> fcnum {
|
||||
parser, "50", "number of fcode alphabet", {"fc-num"}, 50
|
||||
};
|
||||
|
||||
@ -45,10 +45,10 @@ static void Exec() {
|
||||
Enforce(br.size() == bn, "all node should have the same number of branch");
|
||||
}
|
||||
|
||||
size_t fcode = args::get(param::first);
|
||||
uint32_t fcode = args::get(param::first);
|
||||
std::cout << fcode << '\n';
|
||||
|
||||
for (size_t dcode, t = 0; std::cin >> dcode; ++t) {
|
||||
for (uint32_t dcode, t = 0; std::cin >> dcode; ++t) {
|
||||
Enforce(dcode < bn, "dcode must be lower than number of branch");
|
||||
Enforce(fcnum*(t+1) <= smap.size(), "smap row shortage");
|
||||
fcode = smap[t*fcnum + fcode][dcode];
|
||||
|
@ -21,7 +21,7 @@ ValueFlag<std::string> smap {
|
||||
parser, "path", "step map file path", {"smap"},
|
||||
};
|
||||
|
||||
ValueFlag<size_t> fcnum {
|
||||
ValueFlag<uint32_t> fcnum {
|
||||
parser, "50", "number of fcode alphabet", {"fc-num"}, 50
|
||||
};
|
||||
|
||||
@ -42,9 +42,9 @@ static void Exec() {
|
||||
Enforce(br.size() == bn, "all node should have the same number of branch");
|
||||
}
|
||||
|
||||
size_t fcode_p, dcode;
|
||||
size_t fcode_p;
|
||||
std::cin >> fcode_p;
|
||||
for (size_t fcode, t = 0; std::cin >> fcode; ++t) {
|
||||
for (uint32_t fcode, t = 0; std::cin >> fcode; ++t) {
|
||||
Enforce(fcode < fcnum, "fcode overflow");
|
||||
Enforce(fcnum*(t+1) <= smap.size(), "smap row shortage");
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <args.hxx>
|
||||
|
||||
#include "conv/common.hh"
|
||||
#include "common.hh"
|
||||
|
||||
|
||||
namespace param {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <codec/api/wels/codec_api.h>
|
||||
|
||||
#include "conv/common.hh"
|
||||
#include "common.hh"
|
||||
|
||||
|
||||
namespace param {
|
||||
@ -230,7 +230,7 @@ static void Exec() {
|
||||
}, &vst, vsz);
|
||||
|
||||
// find video track
|
||||
int ti;
|
||||
size_t ti;
|
||||
for (ti = 0; ti < dem.track_count; ++ti) {
|
||||
const auto& tra = dem.track[ti];
|
||||
if (tra.handler_type == MP4D_HANDLER_TYPE_VIDE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user