Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #197: Missing braces in for loop #198

Closed
wants to merge 1 commit into from
Closed

Conversation

Zenexer
Copy link

@Zenexer Zenexer commented Dec 15, 2020

Fixes #197.

@fduncanh
Copy link

Those braces are optional, it's a one line "for" statement. Your proposed change is cosmetic.

@Zenexer
Copy link
Author

Zenexer commented Jun 22, 2021

@fduncanh They aren't optional if that entire line is meant to be looped. Currently, it's effectively this:

for ( i = 0; i < s->payloadSize; i++ ) {
    printf("%ld.%d: ", (long int)(b->p - b->start), b->bits_left);
}

s->data[i] = bs_read_u8(b); printf("s->data[i]: %d \n", s->data[i]); 

Implicit braces are per-statement, not per-line.

@fduncanh
Copy link

fduncanh commented Jun 24, 2021

sorry, you are right of course.
Luckily, from the function name it seems to be in code only used
at some time for debugging h264-bitstream code.

It's never referenced unless HAVE_SEI is defined, which appears not to be the case. (so it appears to
be dead code)

In my use (not RPi) of RPiPlay, that h264-bitstream code is never compiled,

@fduncanh
Copy link

fduncanh commented Jun 24, 2021

you should report it upstream here: (there appears still to be someone occasionally looking at issues there)

https://github.com/aizvorski/h264bitstream

@FD-
Copy link
Owner

FD- commented Nov 6, 2021

Yeah, please report it to upstream! We're not using that part of the code, but other consumers of h264bitstream may.

@FD- FD- closed this Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing braces around for loop
3 participants