Remove several compiler warnings of the form
wmifs.c:666:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(temp, BUFFER_SIZE, fp);
^
This patch consists of all remaining differences between the Debian package
version 1.3b1-22 and the original upstream source. They were not mentioned
in the Debian changelog.
Patch by Chris Hanson <cph@martigny.ai.mit.edu>. First appeared in Debian
package 1.3b1-6.
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=39922:
wmifs crashes with a cryptic X error message when there are more than
4 net devices. This occurs for me because I install vmware, which
installs 4 network devices for its bridging hack.
The bug is a loop that fills a fixed-length array, but doesn't stop
when the array is full. The fix is to add a conditional break to the
loop. A patch appears below.
I made two additional changes: (1) increased the size of the array,
and (2) changed a name comparison to compare all of the characters of
the name, rather than just the visible characters, since there may be
multiple net devices with the same first 4 characters (vmware does
this, too).
Patch by Barak Pearlmutter <bap@cs.unm.edu>. First appeared in Debian package
version 1.3b1-6.
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=83003:
On my laptop, following a suspend, wmifs scrolls like nuts for a long
time. The scroll speed looks the same as for a wmifs that is paused
for a while using C-z.
Here is a patch that prevents this speedy scrolling problem. I also
got rid of a couple unnecessary compiler warnings.
Patch by Stephen Pitts <smpitts@midsouth.rr.com>. First appeared in Debian
package version 1.3b1-4.
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=41746:
wmifs started crashing on startup on my system,
so I grabbed the source, added -g to the
Makefile, and ran it through gdb.
(Wow, the wonders of Open Source!!).
I found out that it has the hard-coded assumption
that a line in /proc/net/dev will be no longer
than 128 bytes. Since my ethernet card has over
1 GB in traffic , my eth0 line was 129 bytes long.
I added a new constant, BUFFER_SIZE, that
determines the size of the buffer used for fgets.
Right now, its at 512 bytes, so that gives it
a large margin of error, until we have petabyte
Ethernet! The patch is attached.