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

castget on FreeBSD 9.3 amd64 does not find g_strlen (src/progress.c:95) #7

Closed
opsec opened this issue Jan 24, 2016 · 4 comments
Closed
Assignees
Labels

Comments

@opsec
Copy link

opsec commented Jan 24, 2016

See

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206565

and the attachment, where I replaced g_strlen with strlen. Which compiles, but I do not understand the details of gnome to know if this really fixes the issue. Is the patch correct or what would be the correct patch ?

Without it, it fails to build, see

http://people.freebsd.org/~pi/logs/www__castget-93a-1453624637.txt

@mlj mlj added the bug label Jan 26, 2016
@mlj mlj self-assigned this Jan 26, 2016
@mlj
Copy link
Owner

mlj commented Jan 26, 2016

Thanks for you report, which revealed a more serious bug.

First, g_strlen is a typo and should be replaced by strlen.

The more serious problem is that the variable columns is never initialized. I guess the reason why this compiles on my platform (gcc 5.3/x86_64 Linux) is that the compiler eliminates the entire block.

mlj added a commit that referenced this issue Jan 26, 2016
This fixes a bug in reading the environment variable COLUMNS when
determining the width of the progress bar. The variable columns was
never correctly initialized (and the subsequent if-block would be
eliminated by recent versions of gcc hiding the strlen typo).

Fixes #7.
@mlj
Copy link
Owner

mlj commented Jan 26, 2016

I have uploaded a new version (1.2.2) with this fix. @opsec, can you verify that it builds on FreeBSD?

@opsec
Copy link
Author

opsec commented Jan 26, 2016

testing@work

@opsec
Copy link
Author

opsec commented Jan 26, 2016

cur 93a 10a 10i builds done, all fine.

@opsec opsec closed this as completed Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants