leahneukirchen / redo-c

An implementation of the redo build system in portable C with zero dependencies
105 stars 12 forks source link

Fix some compiler warnings #9

Closed fingolfin closed 3 years ago

fingolfin commented 3 years ago

On non-Linux systems (e.g. macOS, BSD), st.st_ctime may not be of the right type for PRIx64 ; so just cast it to an uint64_t, which is the type PRIx64 corresponds to.

Also, clang may warn about "/"+(*dirprefix ? 0 : 1), suspecting a coding error. Using (*dirprefix ? "/" : "") is unambiguous and also easier to grok for some people (e.g. myself ;-)).