VS编译C++时的几个警告

百度说是要加个判断检查返回值是否为NULL,可是这里只是定义了一个指针啊,没有用NEW申请内存,为什么还会有警告?

void Find_Middle(linklist Headnode)     //链表的中间元素
{
    linklist pFast, pSlow;
    pFast = Headnode;
    pSlow = Headnode;

    while ((pFast != NULL) && (pFast->next != NULL))
    {
        pFast = pFast->next->next;
        pSlow = pSlow->next;
    }
    if (Length_Node(Headnode) % 2 == 1) 
        cout << "Middle is " << pSlow->m << endl;
    else
    {
        //----------**-以下两句都有警告-**---------------
        cout << "Middle is " << pSlow->m << endl;
        cout << "Middle is " << pSlow->next->m << endl;
    }

    return;
}

错误代码C28182 取消对 NULL 指针的引用。“pSlow”包含与“pFast”相同的 NULL 值。

错误代码C6011,取消NULL指针对pSlow->next的引用

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^