[Bug 216627] multimedia/zoneminder and multimedia/zoneminder-h264: fail to build with clang 4.0
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Feb 5 18:21:49 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
--- Comment #4 from Jan Beich (mail not working) <jbeich at FreeBSD.org> ---
Comment on attachment 179574
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179574
zoneminder patch
Can you describe other changes? This is mainly for commit message.
> +- if ( mem_ptr < 0 )
> ++ if ( mem_ptr < (void *)0 )
[...]
> +- if ( mem_ptr > 0 )
> ++ if ( mem_ptr > (void *)0 )
mmap(2) returns MAP_FAILED on failure while shmat(2) returns (void *)-1. Both
are greater than 0 on FreeBSD i386/amd64 but may not be so on other platforms.
> +- if ( shmdt( mem_ptr ) < 0 )
> ++ if ( shmdt( mem_ptr ) < (void *)0 )
shmdt(2) returns int, not a pointer. I don't think you need to touch this line.
> +- if ( (fd = fopen( path, "w" )) < 0 )
> ++ if ( (fd = fopen( path, "w" )) < (void *)0 )
fopen(3) returns NULL on failure, not a negative value. Maybe use "== NULL"
instead.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list