Patch from abbotti@mev.co.uk (Ian Abbott):
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 2 May 2006 02:09:02 +0000 (02:09 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 2 May 2006 02:09:02 +0000 (02:09 +0000)
Fixes compile error with gcc 2.96.

demo/ao_mmap.c

index f4b65d9aa5879849874f563b4aa95058043f21ed..5da1464dbcce903cbea7ff0c96bd0c17c786fe66 100644 (file)
@@ -171,12 +171,12 @@ int main(int argc, char *argv[])
        while(1)
        {
                int bytes_marked = comedi_get_buffer_contents(dev,subdevice);
+               int bytes_unmarked = size - bytes_marked;
                if(bytes_marked < 0)
                {
                        comedi_perror("comedi_get_buffer_contents");
                        exit(1);
                }
-               int bytes_unmarked = size - bytes_marked;
                if(bytes_unmarked > 0)
                {
                        // this keeps comedi from reporting a buffer underrun