Giter Club home page Giter Club logo

Comments (7)

ad-oliviero avatar ad-oliviero commented on June 16, 2024

When i compile, i don't get this warning, can you tell me your gcc version?
Anyway this is only a warning, so uwufetch should work without problems.

from uwufetch.

ad-oliviero avatar ad-oliviero commented on June 16, 2024

The last commit removes some of the fscanf(), could you check if it now compiles without warnings?

from uwufetch.

sethnine avatar sethnine commented on June 16, 2024

I am getting the similar warnings and after installing from source
errorfile.txt
I'm on pop_os using gcc version: 10.2.0 (Ubuntu 10.2.0-13ubuntu1)

from uwufetch.

ad-oliviero avatar ad-oliviero commented on June 16, 2024

I am getting the similar warnings and after installing from source errorfile.txt

I'll try to completely rewrite the pkgman() function without fscanf()

I'm on pop_os using gcc version: 10.2.0 (Ubuntu 10.2.0-13ubuntu1)

The gcc version might be the problem, with gcc 11.1.0 i get no warnings.

from uwufetch.

Guaxinim5573 avatar Guaxinim5573 commented on June 16, 2024

I'm with gcc 10.2.0 and get no warnings.
Arch Linux.
gcc -vt.txt

from uwufetch.

ad-oliviero avatar ad-oliviero commented on June 16, 2024

With some googling, I found that this warning exists because ignoring error handling for fscanf could lead to serious errors, so adding some error handling should fix it. Let me know if the error is still here.

from uwufetch.

sethnine avatar sethnine commented on June 16, 2024

Seems like you got most of them I'm just getting one warning now

after running make build:

gcc -O3 -o uwufetch uwufetch.c
uwufetch.c: In function ‘get_info’:
uwufetch.c:173:4: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
173 | fscanf(whoami, "%s", user);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

and sudo make install gives no warnings/ errors

cp uwufetch /usr/bin/uwufetch
ls /usr/lib/uwufetch/ 2> /dev/null || mkdir /usr/lib/uwufetch/
cp res/* /usr/lib/uwufetch/

from uwufetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.