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

Warnings when running sudo make install #7

Closed
sbrl opened this issue Oct 14, 2015 · 4 comments
Closed

Warnings when running sudo make install #7

sbrl opened this issue Oct 14, 2015 · 4 comments

Comments

@sbrl
Copy link

sbrl commented Oct 14, 2015

When I run sudo make install, I get the following warnings:

Scanning dependencies of target catimg
[ 25%] Building C object CMakeFiles/catimg.dir/src/sh_color.c.o
[ 50%] Building C object CMakeFiles/catimg.dir/src/sh_utils.c.o
[ 75%] Building C object CMakeFiles/catimg.dir/src/catimg.c.o
/tmp/catimg/src/catimg.c: In function ‘main’:
/tmp/catimg/src/catimg.c:84:20: warning: the address of ‘supportsUTF8’ will always evaluate as ‘true’ [-Waddress]
                if (supportsUTF8)
                    ^
/tmp/catimg/src/catimg.c:113:41: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
                                         usleep(img.delays[frame - 1] * 10000);
                                         ^
/tmp/catimg/src/catimg.c:101:17: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
                 system("clear");
                 ^
[100%] Building C object CMakeFiles/catimg.dir/src/sh_image.c.o
In file included from /tmp/catimg/src/sh_image.c:3:0:
/tmp/catimg/src/stb_image.h: In function ‘stbi__gif_load_next’:
/tmp/catimg/src/stb_image.h:5653:84: warning: unused parameter ‘req_comp’ [-Wunused-parameter]
 static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp)
                                                                                    ^
/tmp/catimg/src/sh_image.c: In function ‘stbi_xload’:
/tmp/catimg/src/sh_image.c:37:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
                 while (gr->data = stbi__gif_load_next(&s, &g, channels, 4))
                 ^
/tmp/catimg/src/sh_image.c: In function ‘img_load_from_file’:
/tmp/catimg/src/sh_image.c:164:33: warning: ‘pixelSetter’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                                 pixelSetter(&img->pixels[j + frame*w*h], ptr + i * sizeof(unsigned char) + offset);
                                 ^
Linking C executable bin/catimg
[100%] Built target catimg
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/catimg

I didn't know whether this is a problem, so I thought I'd report it - just to be on the safe side. Here's my uname -a:

Linux starbeamrainbowlabs.com 2.6.32-042stab111.12 #1 SMP Thu Sep 17 11:38:20 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
@posva posva closed this as completed in a5e1dce Oct 14, 2015
@posva
Copy link
Owner

posva commented Oct 14, 2015

Hi, thanks for the report I was ignoring a warning that was actually an error 😅

@posva
Copy link
Owner

posva commented Oct 14, 2015

If you have suggestions for the remaining warnings I'd love to hear about it 😉

@sbrl
Copy link
Author

sbrl commented Oct 14, 2015

Thanks for the help! :) I don't have any suggestions, but I do find this useful on servers that don't have a gui.

I don't know much C(++) yet, but I might be able to help later on as I'm learning it now!

@posva
Copy link
Owner

posva commented Oct 14, 2015

@sbrl I even use it in my desktop xD

The code for catimg is quite simple to be honest (compared to other C projects)

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

No branches or pull requests

2 participants