Skip to content

Commit

Permalink
fix: remove compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Feb 18, 2025
1 parent f0af3ce commit 603cddf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
timeout-minutes: 5
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 16 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ android {
}
}
}

release {
externalNativeBuild {
cmake {
arguments("-DCMAKE_BUILD_TYPE=MinSizeRel")
}
}
}

debug {
externalNativeBuild {
cmake {
arguments("-DCMAKE_BUILD_TYPE=Debug")
}
}
}
}

externalNativeBuild {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(miniz)

target_compile_options(miniz PUBLIC -Wno-unused-function -Wno-newline-eof -Wno-\#pragma-messages)

# Declares the project name. The project name can be accessed via ${ PROJECT_NAME},
# Since this is the top level CMakeLists.txt, the project name is also accessible
# with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level
Expand Down
17 changes: 0 additions & 17 deletions lib/src/main/cpp/proc_maps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,3 @@ bool proc_map_parse(std::vector<proc_map_t> &maps) {
fclose(fp);
return true;
}


void proc_map_fmt(proc_map_t &map, char *out) {
out += sprintf(out, "%p-%p", map.address_start, map.address_end);
out += sprintf(out, " %c%c%c%c",
(map.flags & PROC_MAP_READ) != 0 ? 'r' : '-',
(map.flags & PROC_MAP_WRITE) != 0 ? 'w' : '-',
(map.flags & PROC_MAP_EXEC) != 0 ? 'x' : '-',
(map.flags & PROC_MAP_PRIVATE) != 0 ? 'p' : (map.flags & PROC_MAP_SHARED) != 0 ? 's' : '-');

out += sprintf(out, " %lx", map.offset);
out += sprintf(out, " %x:%x", (int) map.dev_major, (int) map.dev_minor);
out += sprintf(out, " %lu", map.inode);

if (!map.file_name.empty())
sprintf(out, " %s", map.file_name.data());
}
2 changes: 0 additions & 2 deletions lib/src/main/cpp/proc_maps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ struct proc_map_t {

bool proc_map_parse(std::vector<proc_map_t> &maps);

void proc_map_fmt(proc_map_t &map, char *out);

#endif //PROC_MAP_UTIL_HPP

0 comments on commit 603cddf

Please sign in to comment.