Some versions of CLang warn when performing pointer arithmetic on strings, trying to avoid people thinking + is a string concatenation operator in C. It's kind of silly, but given we only seem to have one of those instances, just "fix" it using array syntax instead.

PS: I was about to troll the compiler using syntax &(has_bom ? 3 : 0)[str] instead, but I figured it's probably not gonna annoy the compiler as much as the next contributor, so I backed out.


You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/4230

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/4230@github.com>