/* $NetBSD: msg_171.c,v 1.9 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_171.c" // Test for message: cannot assign to '%s' from '%s' [171] /* lint1-extra-flags: -X 351 */ struct s { int member; }; /*ARGSUSED*/ void example(int i, void *vp, struct s *s) { /* expect+1: error: cannot assign to 'int' from 'struct s' [171] */ i = *s; /* expect+1: error: cannot assign to 'struct s' from 'int' [171] */ *s = i; /* expect+1: error: cannot assign to 'pointer to void' from 'struct s' [171] */ vp = *s; /* expect+1: error: cannot assign to 'struct s' from 'pointer to void' [171] */ *s = vp; } /* * C99 6.5.2.5 says that a compound literal evaluates to an unnamed object * with automatic storage duration, like any normal named object. It is an * lvalue, which means that it is possible to take the address of the object. * Seen in external/mpl/bind/dist/lib/dns/rbtdb.c, update_rrsetstats. * * Before init.c 1.111 from 2021-03-23, lint could not handle these nested * initializations (the outer one for the variable 'p', the inner one for the * compound literal) and wrongly complained about a type mismatch between * 'struct point' and 'pointer to struct point'. */ void pointer_to_compound_literal(void) { struct point { int x; int y; }; struct point *p = &(struct point){ 12, 5, }; /* * A sizeof expression is another way to create nested * initializations. */ struct point p2 = { (int)sizeof(struct point){ (int)sizeof(struct point){ (int)sizeof(struct point){ (int)sizeof(struct point){ 0, 0, }, 0, }, 0, }, 0, }, 0, }; } kdoc-9.3'/>
path: root/lib/lua
AgeCommit message (Collapse)Author
2021-03-05Pull up the following (all via patch), requested by mrg in ticket #1221:martin
lib/lua/bozohttpd/Makefile (apply patch) libexec/httpd/Makefile 1.30-1.31 libexec/httpd/Makefile.boot 1.7-1.9 libexec/httpd/auth-bozo.c 1.25-1.26 libexec/httpd/bozohttpd.8 1.80-1.87 libexec/httpd/bozohttpd.c 1.114-1.123,1.125-1.128 libexec/httpd/bozohttpd.h 1.61-1.68 libexec/httpd/cgi-bozo.c 1.49-1.53 libexec/httpd/content-bozo.c 1.17-1.20 libexec/httpd/daemon-bozo.c 1-.22 libexec/httpd/dir-index-bozo.c 1.33-1.34 libexec/httpd/main.c 1.23-1.27 libexec/httpd/printenv.lua 1.4-1.5 libexec/httpd/ssl-bozo.c 1.27-1.29 libexec/httpd/libbozohttpd/libbozohttpd.3 1.5-1.6 libexec/httpd/small/Makefile 1.4 libexec/httpd/testsuite/Makefile 1.14 libexec/httpd/testsuite/t16.in 1.1 libexec/httpd/testsuite/t16.out 1.1 libexec/httpd/testsuite/t17.in 1.1 libexec/httpd/testsuite/t17.out 1.1 libexec/httpd/testsuite/t18.in 1.1 libexec/httpd/testsuite/t18.out 1.1 Update to bozohttpd 20210227. Apply lua build fix (no blocklist support on this branch). changes in bozohttpd 20210227: o new support for content types: .tar.bz2, .tar.xz, .tar.lz, .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma, .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar. should fix netbsd PR#56026: MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid changes in bozohttpd 20210211: o fix various NULL derefs from malformed headers. mostly from <emily@ingalls.rocks>. o fix memory leaks in library interface: add bozo_cleanup(). changes in bozohttpd 20201014: o also set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net. o fix array size botch (assertion, not exploitable.) from martin@netbsd.org. o also match %2F as well as %2f. from leah@vuxu.org. o many manual and help fixes. clean ups for higher lint levels, consistency/style clean ups. various option fixes including made -f imply -b. from <henrik@gulbra.net> for freebsd. changes in bozohttpd 20200912: o add .m4a and .m4v file extensions. changes in bozohttpd 20200820: o make this work on sun2 by reducing mmap window there. o fix SSL shutdown sequence. from spz@netbsd.org. o add readme support to directory indexing. from jmcneill@netbsd.org o add blocklist(8) support. from jruoho@netbsd.org.
2019-05-16Prevent Lua from crashing if clear_bindings() is called on a statementtpaul
that failed to prepare(). ok mbalmer@
2018-05-03Hello bozohttpd(3lua)sevan
2017-05-10Guard against double freeing of objects (explicit by the Lua program, thenmbalmer
later by the garbage collector). This fixes PR bin/52218.
2016-02-15Fix function name, no functional change.mbalmer
Found by Travis Paul, (see PR/50786), thanks for reporting!
2015-02-02lua: updated from 5.3 work3 to 5.3.0lneto
* improved the overall kernel Lua patch; fixed coercion * updated lua/syslog * updated luapmf and luasystm Makefiles
2014-07-19lua: updated from 5.1 to 5.3 work3lneto
* lua(1): - changed lua_Integer to intmax_t - updated distrib/sets/lists and etc/mtree - updated bsd.lua.mk - fixed bozohttpd (lua-bozo.c) - compatibilized bindings: gpio, sqlite * lua(4): - removed floating-point and libc dependencies using '#ifndef _KERNEL' - fixed division by zero and exponentiation - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct() - acpica: removed isprint() from acnetbsd.h - libc: moved strcspn.c, strpbrk.c and strspn.c to common - removed stub headers - compatibilized bindings: luapmf, luasystm * reorganized luaconf.h * updated doc/CHANGES and doc/RESPONSIBLE
2013-11-13Add the syslog(3) Lua binding to the build.mbalmer
2013-11-12Add a syslog(3) binding for Lua (not yet linked to the build.)mbalmer
2013-10-27More user friendly sqlite.open() function.mbalmer
Add a few more symbols. Register all function in the sqlite table.
2013-10-26also register gpio_methods on the gpio tablembalmer
2012-11-02- Update to the version on github.com.mbalmer
- Fix stmt_bind(): SQLite makes a copy of the string passed (which can be garbage collected). Problem found by Kubo Takehiro.
2012-03-15Add __printflike attribution to use vprintf and friends with an argumentjoerg
as format string.
2012-03-03Add an empty line.mbalmer
2011-11-13Remove an unused constant.mbalmer
2011-11-13Remove software pulsing.mbalmer
2011-11-13Start numbering pions with 0, not 1. Ruined a demo, so it was a bad idea.mbalmer
2011-11-08Check MKPIC and don't hard-code m68k.joerg
2011-10-16Fix dependency.mbalmer
2011-10-15Remove, has been moved to share/examples/lua.mbalmer
2011-10-15Add db:changes()mbalmer
2011-10-15Link the sqlite Lua module to the build and add it to the set lists.mbalmer
2011-10-15Remove un-needed headers.mbalmer
2011-10-15A small test/demo program to show the sqlite Lua module usage.mbalmer
2011-10-15A Lua module to access SQLite databases.mbalmer
2011-10-11use WARNS?=4 for all Lua modulesplunky
2011-10-10Handle sun2christos
2011-10-10turn on warnings, and fix compilation issues.christos
2011-10-08Link the gpio(4) Lua module to the build and add it to the set lists.mbalmer
(There is no manual page yet, since we have not yet decided where to put them for Lua modules.)
2011-10-08Add NetBSD CVS marker, remove some whitespace.mbalmer
2011-10-08Makefile to build gpio.so.mbalmer
2011-10-07Add stub Makefile, not yet called.mbalmer
2011-10-07Interface gpio(4) from Lua. Not linked to the build.mbalmer