crmulliner / ddi

ddi - Dynamic Dalvik Instrumentation Toolkit
http://www.mulliner.org/android/
394 stars 159 forks source link

Compilation erros: -Werror=format-security #5

Closed t0kt0ckus closed 9 years ago

t0kt0ckus commented 10 years ago

Both /ddi/examples/strmon/jni/mon.c and /ddi/examples/smsdispatch/jni/smsdispatch.c cause compilation errors (on latest NDK toolchains):

ddi/examples/strmon/jni/mon.c: In function 'my_log':
ddi/examples/strmon/jni/mon.c:47:2: error: format not a string literal and no format arguments [-Werror=format-security]
ddi/examples/strmon/jni/mon.c: In function 'my_log2':
ddi/examples/strmon/jni/mon.c:52:3: error: format not a string literal and no format arguments [-Werror=format-security]
ddi/examples/smsdispatch/jni/smsdispatch.c: In function 'my_log':
ddi/examples/smsdispatch/jni/smsdispatch.c:49:2: error: format not a string literal and no format arguments [-Werror=format-security]
ddi/examples/smsdispatch/jni/smsdispatch.c: In function 'my_log2':
ddi/examples/smsdispatch/jni/smsdispatch.c:54:3: error: format not a string literal and no format arguments [-Werror=format-security]

We can work around these errors by adding LOCAL_DISABLE_FORMAT_STRING_CHECKS := true to the modules' Android.mk. Though, I'm quite sure @jduck will soon properly fix mon.c and smsdispatch.c.

jduck commented 10 years ago

I fixed them (and other issues) but have to do a pull request because I don't have commit access to this repo =)

jduck commented 10 years ago

The fixes are merged, but I can't close this ticket since I don't have the required access !

t0kt0ckus commented 9 years ago

@jduck, thanks.