Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-17 Thread Ruoyu Zhong
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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-17 Thread Panu Matilainen
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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-17 Thread Panu Matilainen
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:

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Ruoyu Zhong
> 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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Florian Festi
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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Florian Festi
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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Ruoyu Zhong
@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

Re: [Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Demi Marie Obenour
@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

[Rpm-maint] [rpm-software-management/rpm] Fix an "expected expression" error (PR #2434)

2023-03-16 Thread Ruoyu Zhong
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) ||