svoboda18 / libnt Goto Github PK
View Code? Open in Web Editor NEWsome POSIX functions ported to WIN32
some POSIX functions ported to WIN32
E:/python/magiskboot/libnt/libnt.c:177:54: warning: incompatible pointer types passing 'DWORD64 *' (aka 'unsigned long long *') to parameter of type 'PDWORD' (aka 'unsigned long *') [-Wincompatible-pointer-types] if (SymGetLineFromAddr64(process, (DWORD64)addr, &dldisp, &symbolLine)) { ^~~~~~~ C:/msys64/clang64/include/psdk_inc/_dbg_common.h:827:79: note: passing argument to parameter 'pdwDisplacement' here WINBOOL IMAGEAPI SymGetLineFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE64 Line64); ^ 1 warning generated. CC mman.o E:/python/magiskboot/libnt/mman.c:177:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^ ~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:43:29: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, __fmt, __VA_ARGS__); \ ~~~~~ ^ E:/python/magiskboot/libnt/mman.c:177:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~~~~~~~~~~~~~^~~ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:45:77: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, "%s:%d:%s: " __fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); \ ~~~~~~~~~~~~~~~~~~~~~~~ ^ E:/python/magiskboot/libnt/mman.c:184:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^ ~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:43:29: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, __fmt, __VA_ARGS__); \ ~~~~~ ^ E:/python/magiskboot/libnt/mman.c:184:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~~~~~~~~~~~~~^~~ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:45:77: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, "%s:%d:%s: " __fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); \ ~~~~~~~~~~~~~~~~~~~~~~~ ^ E:/python/magiskboot/libnt/mman.c:198:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^ ~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~ ^ E:/python/magiskboot/libnt/include/libnt.h:43:29: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, __fmt, __VA_ARGS__); \ ~~~~~ ^ E:/python/magiskboot/libnt/mman.c:198:9: warning: data argument not used by format string [-Wformat-extra-args] NT_DEBUG("failed with %d (%s)", errno, strerror(errno)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:53:46: note: expanded from macro 'NT_DEBUG' #define NT_DEBUG(...) _NT_DEBUG(__VA_ARGS__, "") ~~~~~~~~~~~~~~~~~~~~~~~^~~ E:/python/magiskboot/libnt/include/libnt.h:50:51: note: expanded from macro '_NT_DEBUG' #define _NT_DEBUG(fmt, ...) NT_DEBUG_IMPL(fmt, 0, __VA_ARGS__) ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ E:/python/magiskboot/libnt/include/libnt.h:45:77: note: expanded from macro 'NT_DEBUG_IMPL' fprintf(__trace, "%s:%d:%s: " __fmt "\n", __FILE__, __LINE__, __func__, __VA_ARGS__); \ ~~~~~~~~~~~~~~~~~~~~~~~ ^ 6 warnings generated. CC fnmatch.o AR libnt.a CC test.o E:/python/magiskboot/libnt/test.c:142:90: warning: format specifies type 'long long' but the argument has type '_off_t' (aka 'long') [-Wformat] printf("readlink: %s (sz: %d is_lnk: %d stsz: %lld)", path, sz, S_ISLNK(st.st_mode), st.st_size); ~~~~ ^~~~~~~~~~ %ld
this causes svoboda18/magiskboot to fail on repacking some boot images, and stack overflow occurs.
i think we can use a smaller fixed-size buffer (for example 8192 bytes or sth) instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.