As for the patch, the correct format string for size_t is %zu. I'll commit that fix in the morning if no one beats me to it.
-- Rick Altherr kc8...@kc8apf.net
"He said he hadn't had a byte in three days. I had a short, so I split it with him."
-- Unsigned On May 15, 2009, at 10:02 PM, Dean Glazeski wrote:
Howdy,I was playing around with OpenOCD's building process and I noticed the embedded HTTP server option. Firstly, I was wondering what this was for. The HTTPD option is only listed in the texi, but I couldn't find anything that talked about what it was for. Anyway, during the build I hit a warning caught as error. I've pasted the error and attached a patch that gets rid of the error. Everything seems to run afterwards, but I don't know how to test the HTTPD stuff.Configure Options:./configure --enable-parport --enable-amtjtagaccel --enable-ioutil -- enable-httpd --enable-ft2232_libftdi --enable-presto_libftdi -- enable-usbprog --enable-oocd_trace --enable-jlink --enable-vsllink -- enable-rlink --enable-arm-jtag-ew --enable-dummy --enable-maintainer- modeBuild Error:gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/helper - I../../src/target -I../../src/flash -I../../src/jtag -DPKGLIBDIR=\"/ usr/local/lib/openocd\" -g -O2 -Wall -Wstrict-prototypes -Wformat- security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast- align -Wredundant-decls -Werror -MT libserver_la-httpd.lo -MD -MP - MF .deps/libserver_la-httpd.Tpo -c httpd.c -fPIC -DPIC -o .libs/ libserver_la-httpd.occ1: warnings being treated as errors httpd.c: In function ‘handle_request’:httpd.c:310: error: format ‘%u’ expects type ‘unsigned int’, but argument 7 has type ‘size_t’httpd.c: In function ‘httpd_start’:httpd.c:426: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer typemake[3]: *** [libserver_la-httpd.lo] Error 1make[3]: Leaving directory `/home/dnglaze/workspace/OpenOCD/src/ server'make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/dnglaze/workspace/OpenOCD/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dnglaze/workspace/OpenOCD' make: *** [all] Error 2 Index: src/server/httpd.c =================================================================== --- src/server/httpd.c (revision 1796) +++ src/server/httpd.c (working copy) @@ -307,7 +307,7 @@ return ret; } - LOG_DEBUG("Serving %s length=%u", url, len); + LOG_DEBUG("Serving %s length=%u", url, (unsigned int) len); /* serve file directly */response = MHD_create_response_from_data(len, data, MHD_YES, MHD_NO);MHD_add_response_header(response, "Content-Type", "image/png"); @@ -322,7 +322,7 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, const char * url, const char * method, const char * version,- const char * upload_data, unsigned int * upload_data_size, void ** ptr)+ const char * upload_data, size_t * upload_data_size, void ** ptr) { int post = 0; _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development