<feed xmlns='http://www.w3.org/2005/Atom'>
<title>uci/lua, branch master</title>
<subtitle>OpenWrt Unified Configuration Interface</subtitle>
<id>https://git.openwrt.org/project/uci/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/uci/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/'/>
<updated>2025-10-05T12:33:54Z</updated>
<entry>
<title>lua: CMakeLists: drop redundant cmake_minimum_required</title>
<updated>2025-10-05T12:33:54Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2025-10-05T12:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=272fc1348ea9a13303828744a7f21fd269e87227'/>
<id>urn:sha1:272fc1348ea9a13303828744a7f21fd269e87227</id>
<content type='text'>
The Lua module depends on the parent uci project and can't be build
independently.

Drop redundant cmake_minimum_required from lua/CMakeLists.txt and
inherit the version from the parent CMake project to keep version
consistency.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
[ improve commit description ]
Link: https://github.com/openwrt/uci/pull/7
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>lua: CMakeLists: update cmake minimum required version to 3.10</title>
<updated>2025-10-03T22:03:31Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2025-10-03T22:03:31Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=a072095389595225af6996d33e1dba212af35f38'/>
<id>urn:sha1:a072095389595225af6996d33e1dba212af35f38</id>
<content type='text'>
New cmake version 4.0 requires at least 3.5 version as the minimum
required version with it increased to 3.10 in to-be-released cmake
versions.

Set the minimum required version to 3.10 to future-proof for future
cmake version.

Suggested-by: Hannu Nyman &lt;hannu.nyman@iki.fi&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>add support for an override config directory</title>
<updated>2025-01-17T10:25:08Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2025-01-17T10:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=fb3c2343b17b759b175f11aec5b3fbb1cf48bbc3'/>
<id>urn:sha1:fb3c2343b17b759b175f11aec5b3fbb1cf48bbc3</id>
<content type='text'>
This can be used to override specific config files at runtime without
touching them on primary storage. It is used by default for both reading
and updating.
The primary use case for this is adding a config management system which
generates and manages uci files at run time without overwriting existing
config files on flash.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>remove internal usage of redundant uci_ptr.last</title>
<updated>2023-08-10T17:43:45Z</updated>
<author>
<name>Jan Venekamp</name>
</author>
<published>2023-07-14T18:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=5781664d5087ccc4b5ab58505883231212dbedbc'/>
<id>urn:sha1:5781664d5087ccc4b5ab58505883231212dbedbc</id>
<content type='text'>
In uci_lookup_ptr and uci_set the pointer uci_ptr ptr.last is set to
the element corresponding to the first of: ptr.o, ptr.s, ptr.p.

Thus, ptr.last is redundant and in case of uci_set is (and was) not
always consistently set.

In order to simplify the code this commit removes internal usage
of ptr.last, and remove setting it from uci_set (and from uci_add_list
that was never used anyway).

As it is part of the public C api ptr.last cannot be completely
removed though. A search on lxr.openwrt.org shows that it is used as
the output of uci_lookup_ptr in several packages.

So we leave setting ptr.last in uci_lookup_ptr intact.

Signed-off-by: Jan Venekamp &lt;jan@venekamp.net&gt;
</content>
</entry>
<entry>
<title>lua: add missing forward declaration</title>
<updated>2019-12-07T22:14:01Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-12-07T22:12:24Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=654d7c33da28d492412e1a0fe4463f27d362e9b9'/>
<id>urn:sha1:654d7c33da28d492412e1a0fe4463f27d362e9b9</id>
<content type='text'>
Fixes following warning reported by clang-10:

  lua/uci.c:1050:1: error: no previous declaration for ‘luaopen_uci’ [-Werror=missing-declarations]

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>lua: fix error handling</title>
<updated>2019-11-14T21:01:12Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T23:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=8dd50da20de0ece65118b2b4b71f8df8ac3a1f6d'/>
<id>urn:sha1:8dd50da20de0ece65118b2b4b71f8df8ac3a1f6d</id>
<content type='text'>
scan-build from clang version 9 has reported following issues:

 uci.c:389:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:393:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_NOTFOUND;
                ^     ~~~~~~~~~~~~~~~~
 uci.c:417:4: warning: Value stored to 'err' is never read
                        err = UCI_ERR_INVAL;
                        ^     ~~~~~~~~~~~~~
 uci.c:524:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:533:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:565:4: warning: Value stored to 'err' is never read
                        err = UCI_ERR_INVAL;
                        ^     ~~~~~~~~~~~~~
 uci.c:575:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:584:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:642:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~
 uci.c:651:3: warning: Value stored to 'err' is never read
                err = UCI_ERR_INVAL;
                ^     ~~~~~~~~~~~~~

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>lua: fix memory leak in set method</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T22:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=39093f3b040df895da812e2932b55feeeb1201df'/>
<id>urn:sha1:39093f3b040df895da812e2932b55feeeb1201df</id>
<content type='text'>
scan-build from clang version 9 has reported following issue:

 uci.c:624:12: warning: Potential leak of memory pointed to by 's'
       return luaL_error(L, "Cannot set an uci option to an empty table value");
              ^~~~~~~~~~

valgrind confirmed it on the supplied test case:

 ==31013== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1
 ==31013==    by 0x56C49B9: strdup (strdup.c:42)

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>lua: fix memory leak in changes method</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T21:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=19ceff323f1e2e7df26031a9fae29fff2edc65bd'/>
<id>urn:sha1:19ceff323f1e2e7df26031a9fae29fff2edc65bd</id>
<content type='text'>
Configs returned by uci_list_configs call are not freed when not needed,
leading to the memory leak. While at it make the code cleaner.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>lua: fix copy&amp;paste in error string</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T19:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=2b549cc050de17ec2263fd97a0abc0ae3564ad6c'/>
<id>urn:sha1:2b549cc050de17ec2263fd97a0abc0ae3564ad6c</id>
<content type='text'>
When uci_set_confdir fails we should say so.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>iron out all extra compiler warnings</title>
<updated>2019-11-14T16:11:34Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2019-11-04T17:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/uci/commit/?id=af59f86a0db914db60243563956f20e2c0850213'/>
<id>urn:sha1:af59f86a0db914db60243563956f20e2c0850213</id>
<content type='text'>
gcc 9.1 on x86/64 has reported following issues:

 list.c:140:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 file.c:572:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 file.c:850:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 file.c:865:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 delta.c:199:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
 parse.c:80:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
 parse.c:81:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
 file.c:572:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 file.c:850:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 file.c:865:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 delta.c:199:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
 parse.c:80:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
 parse.c:81:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
 ucimap.c:146:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:151:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:243:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:247:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:254:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:258:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:285:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:363:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:563:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:753:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 ucimap.c:879:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
</feed>
