Follow

Just had my first pull request submitted on one of my projects and it was for spelling corrections.

That is sooooo on brand. :)

· · Web · 2 · 0 · 2

@big_chip Just dipping my toe in the github-flavoured water. Never used github before, although I use git locally for my own work.

@ColinTheMathmo Yeah, i don't have a lot of github experience either. I just pull the repo and push the stuff back.

@big_chip OK, so it doesn't build on my machine. I have the log of error reports, and while I *could* have a go at fixing them and trying to create pull requests, that might not be the easiest way of working in this case.

Thoughts?

@big_chip I didn't, but I do now ... that's not the problem. Stand by ...

@big_chip There are two or three errors, which then cascade. None look serious, all should be easy to fix ...

@big_chip There are a few instances of this:

screen_displey_entry.c:
In function ‘zk_screen_display’:

screen_displey_entry.c:31:5: warning:
format ‘%i’ expects argument of type ‘int’,
but argument 3 has type ‘uint64_t’ [-Wformat=]

sprintf( en, "%i", ent->entry_number );

(it's a side note from me that you have "screen_displey_entry")

@ColinTheMathmo yeah there might be a few spelling errors, I think there might be a creaate in there somewhere too.

@big_chip Then there are several instances of this:

entry.c:
In function ‘entry_has_tag’:
entry.c:96:5: error:
‘for’ loop initial declarations are only allowed in C99 mode

for ( int i = 0; i < e->tag_count; i++ ) {

@big_chip Spelling errors aren't really a problem, although they do cause a hiccough for me every time I come across them.

@big_chip So I'm going to modify the makefile to use "-std=c99" and see what happens.

@big_chip (That didn't work, coming back to it in a minute)

In "makefile" what's the difference between ":=" and "=" here:

CXX := gcc
LXX = gcc

@ColinTheMathmo yes try that, I think my gcc must be using c99 at default. Let me know if forcing c99 on your end works.

@big_chip OK, so apart from diving in and changing the code - which I'm reluctant to do - and given that putting -std=c99 didn't work, I'm not sure what to try next.

@josh Reading this makefile, I don't see how that comment makes sense. It may be my reading, so assistance appreciated.

Do you have the makefile? Can you see how it's being used? Can you see where CFLAGS should be added? Because currently it's not there.

CC: @big_chip

@josh @big_chip

(AFK ... other duties call, will return in about 45 minutes or so)

@ColinTheMathmo @josh I’m actually at work at the moment so I will be bobbing in and out.

@big_chip @josh

OK, so my confusion now is that these are C files, not CPP files, so I don't see how they're getting compiled at all.

Show more
@ColinTheMathmo @big_chip I haven't seen that specific makefile, but it's a pretty universal convention, which make should respect by default (if it's using the built-in implicit rules, and nobody's overridden them to ignore it).

You can just put `CFLAGS := -std=c99` anywhere near the top before the main body of rules, probably with a bunch of other variable definitions

@josh Yes, but if you never reference it then it doesn't get used. So you then need to reference it somewhere.

CC: @big_chip

@josh @ColinTheMathmo that is true, i copied the whole makefile from one of my other projects and didn’t change it.

Sign in to participate in the conversation
Board Games Social

Join others in a free (libre!) and user supported social network for board gamers and the games they love.