Thanks, @pmatilai! Yeah it's indeed non-trivial. I only learned this earlier
this week when I ran into another exact same issue.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2434#issuecomment-1473373148
You are receiving this because
Closed #2434.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2434#event-8775539806
You are receiving this because you are subscribed to this thread.
Message ID:
___
Rpm-maint mailing list
Merged manually as commit b960c0b43a080287a7c13533eeb2d9f288db1414
Thanks for reporting and the patch! Every day you learn something new, after
15+ years with C99 I did not know that declarations cannot follow a label
:flushed:
--
Reply to this email directly or view it on GitHub:
> But it is weird and makes it easy to unnecessarily draw attention to some
> language quirk while we can also just use totally fine C code.
Makes sense. (I think you meant #2436.) I attempted this more trivial solution
because I don't know well enough about the code. But I'm happy with
See #2434
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2434#issuecomment-1472593844
You are receiving this because you are subscribed to this thread.
Message ID: ___
Rpm-maint mailing list
Well, I had considered both of these options and decided against both of them.
Yes, adding an empty statement solves this. But it is weird and makes it easy
to unnecessarily draw attention to some language quirk while we can also just
use totally fine C code.
--
Reply to this email directly
@ZhongRuoyu pushed 1 commit.
132050c2ce68273cedd1f246a44720601a4bcdc0 Remove comment for empty statement
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2434/files/5375b90150b5468ea9985b81f10dc8fae20d9db4..132050c2ce68273cedd1f246a44720601a4bcdc0
You are receiving
@DemiMarie commented on this pull request.
> setmeta:
+ ; /* Empty statement for label */
/* Special files require path-based ops */
```suggestion
setmeta:;
/* Special files require path-based ops */
```
--
Reply to this email directly or view
In C, a label should be followed by a statement, not a declaration. The
`setmeta` label in `lib/fsm.c` violated this, and led to a build error with an
error message like the one below:
```
fsm.c:1019:6: error: expected expression
int mayopen = S_ISREG(fp-sb.st_mode) ||