The following function:

void Menu::item::winAppendMenu(HMENU handle) {
    wchar_t* buffer = NULL;
    if (type == separator_type_id) {
        AppendMenu(handle, MF_SEPARATOR, 0, NULL);
    }
    else if (type == vseparator_type_id) {
        AppendMenu(handle, MF_MENUBREAK, 0, NULL);
    }
    else if (type == submenu_type_id) {
        if (winMenu != NULL) {
            LPWSTR str = getWString(winConstructMenuText(), L"", buffer);
            if (wcscmp(str, L""))
                AppendMenuW(handle, MF_POPUP | MF_STRING, (uintptr_t)winMenu, str);
            else
                AppendMenu(handle, MF_POPUP | MF_STRING, (uintptr_t)winMenu, winConstructMenuText().c_str());
        }
    }
    else if (type == item_type_id) {
        unsigned int attr = MF_STRING;

        attr |= (status.checked) ? MF_CHECKED : MF_UNCHECKED;
        attr |= (status.enabled) ? MF_ENABLED : (MF_DISABLED | MF_GRAYED);

        LPWSTR str = getWString(winConstructMenuText(), L"", buffer);
        if (wcscmp(str, L""))
            AppendMenuW(handle, attr, (uintptr_t)(master_id + winMenuMinimumID), str);
        else
            AppendMenu(handle, attr, (uintptr_t)(master_id + winMenuMinimumID), winConstructMenuText().c_str());
    }
    if (buffer != NULL) {delete[] buffer;buffer = NULL;}
}

produces a compiler warning of "ISO C++ forbids converting a string constant to 'wchar_t*' [-Wwrite-strings]"
for the L"" part of the line  LPWSTR str = getWString(winConstructMenuText(), L"", buffer);

Can you explain this warning, and recommend a way to fix the code so the warning no longer happens?
