July 2026

About clang’s -Wweak-vtables warning

The full warning message looks like this:

warning: ‘XXX’ has no out-of-line virtual method definitions; its vtable
will be emitted in every translation unit [-Wweak-vtables]

This warning usually comes from code like:

// XXX.h中
class BaseData
{
public:
    virtual ~BaseData() = default;
    int _base_data = 0;
};

class DerivedDataA final : public BaseData
{
public:
    int _derived_data_a = 0;
};

class DerivedDataB final : public BaseData
{
public:
    int _derived_data_b = 0;
};
Continue reading…

OpenWRT accidental deletion of uhttpd service configuration causing LuCI management page inaccessible

I compiled my own OpenWRT firmware with uHTTPd providing the LuCI UI. While experimenting with server mapping I clicked delete in the top right and applied it:

After that the LuCI interface could no longer be accessed. I realized the configuration I deleted was the web server supporting LuCI. After several reboots the router functions were still normal, but the web management was gone. Dropbear SSH still worked. I was ready to reflash the firmware, but then I found this forum post:

https://forum.openwrt.org/t/cannot-access-luci-after-messing-with-settings/147903

By running the following command:

cp /rom/etc/config/uhttpd /etc/config/uhttpd

The default uhttpd configuration file is restored. Then restart the uhttpd service with service uhttpd restart, or simply reboot the router. The LuCI management page comes back without reflashing, quickly recovering access.