The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Индекс форумов
Составление сообщения

Исходное сообщение
"Доступен новый гипервизор KSM"
Отправлено Ordu, 02-Фев-17 05:04 
>> If you are trying to mimic Torvalds you should spend more time
>> on learning how to use word "bullshit" well and, I believe,
> Mimic Torvalds in what exactly?

In your harsh replies to critics, obviously.

> You're wrong and yet again, try casting a function pointer to a
> void pointer (inverse works, too) under both GCC and MSVC, see
> what you get.

And what I should get?

$ cat tmp.c
void (*casting_pointers())()
{
    void *void_fn = (void*)casting_pointers;
    void (*fn)() = (void (*)()) void_fn;
    return fn;
}
$ gcc -Wall -c tmp.c
$

> I do not have these warnings
> ignored under GCC, I have them ignored under MSVC, idiot.  
> Both GTK and Linux Kernel use GCC.

I don't know what warnings of MSVC you are talking about, but assuming you are right with it and MSVC warnings are useless, you should use gcc -Wall and its warnings or some external static code analizer to check your code.

> Also the incompatible pointer warning that was _only_ ignored for just 1
> function is from here: https://github.com/asamy/ksm/blob/master/ksm.h#L563 which is
> reasonable, if you know how to container_of works, then you'll understand
> why this spurious warning happens.  (The funny part, GCC has
> this problem, but not MSVC, hah.)

I bet you are doing it wrong. I have no idea what definitions of ksm and vcpu structs are (I'm too lazy to do such a research), but look:

    uintptr_t k = (uintptr_t)container_of(vcpu, struct ksm, vcpu_list);

I'm sure that warnings come from inside of container_of due to wrong type of vcpu. To compile this without warnings struct ksm needs be something like:

        struct ksm {
                ...
                struct vcpu vcpu_list;
                ...
        };

I suggest that vcpu_list declared as a struct list_head, therefore you are getting those warnings. Clean your code and either make an explicit cast of vcpu to struct list_head*, or change type of an arg in function declaration to reflect the type of field in struct ksm.

> Also the incompatible pointer warning that was _only_ ignored for just 1 function...

If it is true, than I understand your behaviour even less. Why you need to speak about MSVC and your hatred of compiler warnings, instead of clear explanation of the issue? One unresolved warning is not so bad as systematically ignored warnings. Acting such a way you are showing youself as ignorant fool.

 

Ваше сообщение
Имя*:
EMail:
Для отправки ответов на email укажите знак ! перед адресом, например, !user@host.ru (!! - не показывать email).
Более тонкая настройка отправки ответов производится в профиле зарегистрированного участника форума.
Заголовок*:
Сообщение*:
 
При общении не допускается: неуважительное отношение к собеседнику, хамство, унизительное обращение, ненормативная лексика, переход на личности, агрессивное поведение, обесценивание собеседника, провоцирование флейма голословными и заведомо ложными заявлениями. Не отвечайте на сообщения, явно нарушающие правила - удаляются не только сами нарушения, но и все ответы на них. Лог модерирования.



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру