[Ur] Bug Report

Adam Chlipala adamc at impredicative.com
Sat Dec 17 09:25:20 EST 2011


James Parker wrote:
> I believe I have found a bug. Here is the error message:
>
> $ urweb umdtalks -debug
> gcc  -pthread -Wimplicit -Werror -Wno-unused-value -I /usr/local/include/urweb  -c /tmp/webapp.c -o /tmp/webapp.o -g
> cc1: warnings being treated as errors
> /tmp/webapp.c: In function ‘uw_handle’:
> /tmp/webapp.c:2187: error: initialization from incompatible pointer type
>
> The code is available at:
>
> https://github.com/jprider63/UMDTalks
>
> The errors seem to go away if I change the first parameter from inputError to (). Relevant lines are umdtalks.ur:312,318,343.
>    

You're right; it was a compiler bug.  I've fixed it now.  Thanks for the 
report!

A few bits of advice, based on looking through your code:

I see your Makefile has an extra 'mv' from $(EXE).exe to $(EXE).  You 
can output to the latter file in the first place, using the 'exe' .urp 
directive.

All Ur/Web applications have OpenSSL linked in, so you might consider 
using OpenSSL crypto functions in place of mhash's.  Examples of using 
such functions are in the openid library.




More information about the Ur mailing list