sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Compile as C99 #157

Closed Alcaro closed 6 years ago

Alcaro commented 6 years ago

Fixes #156

The obvious fix would be renaming that variable, but adding -std=c99 instead has two advantages: It makes sure nobody else runs into similar traps later, and it improves compatibility with old compilers that default to -std=gnu89 and fail on variable declarations in for loops. (Modern GCCs default to -std=gnu11.)

Could use -std=c11 instead, but unless we're using C11 features, using C11 seems pointless.

sm00th commented 6 years ago

Looks good, but could you add the same reasoning to the commit message? It would make it easier to see it without having to open the browser.

I also think the variable should still be renamed to something like unixtime.

Alcaro commented 6 years ago

Can do

Renaming the variable seems like a separate issue to me.