Be aware of using gmake or make on BSD systems

When working on BSD systems, you should be aware of using gmake or make. E.g., I met a weird error using make on NetBSD today:

# make
.....
/usr/lib/crt0.o: In function `___start':
(.text+0xf7): undefined reference to `main'
collect2: error: ld returned 1 exit status
*** Error code 1
......

But using gmake, the compilation is OK.

Use clang-tindy on VoidLinux

To use clang-tidy on VoidLinux, you should install clang-tools-extra first:

# xbps-install -Suv clang-tools-extra

Take following code as an example:

# cat main.cpp
struct Base
{
        virtual void do_thing() = 0;
        int data;
};

struct Derived : Base
{
        virtual void do_thing(int i) {}
};

int main()
{
}

Use clang-tidy to check it:

# clang-tidy -checks=* *.cpp --
387 warnings generated.
/root/main.cpp:1:8: warning: constructor does not initialize these fields: data [cppcoreguidelines-pro-type-member-init]
struct Base
       ^
/root/main.cpp:4:6: warning: member variable 'data' has public visibility [misc-non-private-member-variables-in-classes]
        int data;
            ^
Suppressed 384 warnings (384 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.