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

[build] warning: ignoring return value of 'write' #399

Closed
biopsin opened this issue Dec 14, 2020 · 2 comments
Closed

[build] warning: ignoring return value of 'write' #399

biopsin opened this issue Dec 14, 2020 · 2 comments

Comments

@biopsin
Copy link

biopsin commented Dec 14, 2020

Hi there,
while building, it will spitt out among the usual depricated gtk2 warning: 'GTimeVal' ...

tomb-gtk-tray.c: In function 'cb_view':
tomb-gtk-tray.c:185:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  185 |   write(pipefd[1], mountpoint, strlen(mountpoint));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tomb-gtk-tray.c: In function 'cb_close':
tomb-gtk-tray.c:219:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  219 |   write(pipefd[1], mapper, strlen(mapper));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tomb-gtk-tray.c: In function 'cb_slam':
tomb-gtk-tray.c:262:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
  262 |   write(pipefd[1], mapper, strlen(mapper));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe    -Wl,-z,relro -Wl,-z,now -Wl,--as-needed     tomb-gtk-tray.o `pkg-config --libs  libnotify gtk+-2.0` -o tomb-gtk-tray

safe to ignore?

@jaromil
Copy link
Member

jaromil commented Dec 15, 2020

Safe to ignore, let's say. Its generally good to catch the return value of write to detect errors, but in this case it is also a very small string.

@biopsin
Copy link
Author

biopsin commented Dec 15, 2020

Thank you for the replay.

@biopsin biopsin closed this as completed Dec 15, 2020
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