[cfe-users] -Wcast-align

2018-04-12 Thread degski via cfe-users
I have the following code (C11): #define vector_grow(vec, count) \ do { \ if(!(vec)) { \ size_t *__p = (size_t*) malloc ((size_t)(count) * sizeof(*(vec)) + (sizeof(size_t) * 2)); \ assert(__p); \ (vec) = (vo

[cfe-users] App security and the __FILE__ macro

2018-04-12 Thread Rick Mann via cfe-users
The higher-ups decided we needed penetration testing of our app. One of their concerns was that if you run the macOS strings tool on our binary and grep for /Users, you get a ton of absolute paths for source files in the project. This is because (I think) we use the __FILE__ macro as part of our

Re: [cfe-users] App security and the __FILE__ macro

2018-04-12 Thread Duncan P. N. Exon Smith via cfe-users
`strrchr(__FILE__, '/')+1` should get resolved at compile-time whenever you have optimizations on. > On Apr 12, 2018, at 15:38, Rick Mann via cfe-users > wrote: > > The higher-ups decided we needed penetration testing of our app. One of their > concerns was that if you run the macOS strings t