The OpenNET Project / Index page

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



"Доступен новый гипервизор KSM"
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Заметили полезную информацию ? Пожалуйста добавьте в FAQ на WIKI.
. "Доступен новый гипервизор KSM" +/
Сообщение от Orduemail (ok), 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.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Доступен новый гипервизор KSM, opennews, 30-Янв-17, 23:38  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



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

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