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

fe-dcc-(get|send): Fix some -Wpointer-compare with newer gcc #714

Merged
merged 1 commit into from Jun 6, 2017

Conversation

Projects
None yet
2 participants
@dequis
Member

dequis commented Jun 5, 2017

The warning itself:

warning: comparison between pointer and zero character constant [-Wpointer-compare]

Harmless stuff as far as I can tell.

The fix adds a null check that probably isn't needed. The old code that
compared against '\0' worked a lot like a null check so it makes sense
to keep that, while also adding the intended check for empty string.

This was visible with "/dcc close send a" showing an empty filename.
The equivalent for get didn't show the filename in the format string.

fe-dcc-(get|send): Fix some -Wpointer-compare with newer gcc
The warning itself:

>warning: comparison between pointer and zero character constant [-Wpointer-compare]

Harmless stuff as far as I can tell.

The fix adds a null check that probably isn't needed. The old code that
compared against '\0' worked a lot like a null check so it makes sense
to keep that, while also adding the intended check for empty string.

This was visible with "/dcc close send a" showing an empty filename.
The equivalent for get didn't show the filename in the format string.

@ailin-nemui ailin-nemui merged commit 5e9a3ad into irssi:master Jun 6, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

ailin-nemui added a commit to ailin-nemui/irssi that referenced this pull request Dec 7, 2017

Merge pull request irssi#714 from dequis/dcc-fname-gcc-warnings
fe-dcc-(get|send): Fix some -Wpointer-compare with newer gcc

(cherry picked from commit 5e9a3ad)

@ailin-nemui ailin-nemui added this to the 1.0.4 milestone Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment