Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Suggests **, should suggest *

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
foxmuldr Posted - Sep 26 2014 : 08:28:15 AM
I came across this today. It is the first time I've seen it.



Since I'm assigning to *tFor, shouldn't it suggest SForClause* and not SForClause** ?? In testing, I observed the same behavior in VAX 2007.

I was able to reproduce it with this:
void test(void** vtest)
{
    *vtest = (v)
}

When you get to the "v" in "(v)", it gives you a suggestion of void**.

Best regards,
Rick C. Hodgin

-----
License: ... (1-user license) Support ends 2014.10.15
VA_X.dll file version 10.9.2048.0 built 2014.09.22
DevEnv.exe version 9.0.30729.1 Professional
msenv.dll version 9.0.30729.4462
Font: Ubuntu Mono 12 (pixels)
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
4 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Win32
Stable Includes:
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\include;
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

Other Includes:

Stable Source Directories:
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm;
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
c:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\crt\\src;
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 29 2014 : 11:09:55 PM
Ah, thank you for the code sample, now what you are thinking and doing makes sense. I am so used to thinking in terms of new and delete and the casting keywords I was not thinking in terms of malloc needing a cast. We are looking to make suggestions more sensible when we think you may be doing a cast, so I have added this to the case:

case=7519
foxmuldr Posted - Sep 27 2014 : 08:00:33 AM
quote:
Originally posted by feline

I am not sure why you are getting this suggestion here. I am seeing the same behaviour with your sample code, but at a guess the suggestion is going "not sure, but these two symbols are related". Given this, why remove a single star? What are you trying to do here? A manual cast?



Basically, something like this simplified example:
SForClause* iDbf_forClause_allocate(SForClause** tFor)
{
    // Make sure our environment is sane
    if (tFor)
    {
        // Allocate the new entry
        *tFor = (SForClause*)malloc(sizeof(SForClause));

        // Initialize it
        if (*tFor)
            memset(*tFor, 0, sizeof(SForClause));

        // Return our pointer to indicate if it succeeded
        return(*tFor);
    }
    return(NULL);
}
feline Posted - Sep 26 2014 : 9:50:46 PM
I am not sure why you are getting this suggestion here. I am seeing the same behaviour with your sample code, but at a guess the suggestion is going "not sure, but these two symbols are related". Given this, why remove a single star? What are you trying to do here? A manual cast?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000