본문 바로가기
728x90

error: format not a string literal and no format arguments1

[NDK] error: format not a string literal and no format arguments [-Werror=format-security] 에러 NDK를 빌드하던 중 error: format not a string literal and no format arguments [-Werror=format-security] 에러가 발생 sprintf를 사용하던 중에 발생하는 에러였는데 코드의 문제는 아님. ndk 빌드에서 문자열 형식 처리가 에러로 되도록 설정되어 있어서 해당 부분을 수정함 해결방법은 Android.mk 에 LOCAL_DISABLE_FORMAT_STRING_CHECKS := true를 추가하면 에러가 발생하지 않음 [안드로이드]/오류 수정 2021. 12. 11.
728x90