VC7 compile error and warnings


#1

Hello Jules,

I’ve just updated my checkout and I’m getting the following error, which is strange, since looking at the git log this portion of the code has not changed recently:

I’m also getting (dozens of) the following warnings, that make me wonder if the function works as intended:

juce_PixelFormats.h(530) : warning C4100: "b": parametro formale senza riferimenti juce_PixelFormats.h(530) : warning C4100: "g": parametro formale senza riferimenti juce_PixelFormats.h(530) : warning C4100: "r": parametro formale senza riferimenti
Regards
Amedeo


#2

Hmm - I’ve been using VC8 which works fine - I guess the VC7 compiler is a bit more fussy. It seems to be complaining because there was an old C-style struct used there, so changing it to a c++ one should sort it out, in juce_win32_Network, line 304:

struct ASTAT { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff [30]; };

I can’t quite translate the other warning message! Is it saying that the parameter is unreferenced?


#3

(Sorry, I meant to say that you should move that struct to be outside the function so that it’s not a local struct)


#4

I must add that also (presumably) all the PropertyComponent classes fail to compile, this is TextPropertyComponent:

[code]c:…\juce_TextPropertyComponent.h(95) : warning C4511: “juce::TextPropertyComponent”: impossibile generare un costruttore di copia
c:…\juce_TextPropertyComponent.h(39): vedere la dichiarazione di “juce::TextPropertyComponent”

c:…\juce_TextPropertyComponent.h(95) : warning C4512: “juce::TextPropertyComponent”: impossibile generare un operatore di assegnazione
c:…\juce_TextPropertyComponent.h(39): vedere la dichiarazione di “juce::TextPropertyComponent”[/code]


#5

Thanks, that’s an easy one to fix - I’ll check something in shortly…


#6

Jules, you’re too fast to answer! :slight_smile:
Of course your suggestion regarding the ASTAT struct solved the problem.
Concerning the juce_PixelFormats.h(530) warnings, yes, it’s saying that the parameters are unreferenced.

Thanks
Amedeo


#7

Try my latest check-in - hopefully it’ll sort those out.


#8

Done, many thanks. Maybe you forgot to declare the copy constructor and the assignment operator for the ButtonPropertyComponent.
I see there’s a handful other similar situations spread throughout the library, let me know if you need a list.


#9

Thanks, a list would be handy - as I don’t use VC7 any more, I’ve not got a compiler that warns about missing copy constructors, so they’re easy to miss.


#10

Here it is:

unreferenced formal parameter:

juce_TemporaryFile.cpp(57) : warning C4100: "suffix" juce_Typeface.cpp(234) : warning C4100: "characterNeeded" juce_CodeEditorComponent.cpp(203) : warning C4100: "document" juce_CodeEditorComponent.cpp(997) : warning C4100: "e" juce_TooltipWindow.cpp(78) : warning C4100: "c" juce_SliderPropertyComponent.cpp(72) : warning C4100: "newValue" juce_LowLevelGraphicsPostScriptRenderer.cpp(143) : warning C4100: "transform" juce_LowLevelGraphicsPostScriptRenderer.cpp(143) : warning C4100: "srcClip" juce_LowLevelGraphicsPostScriptRenderer.cpp(143) : warning C4100: "sourceImage" juce_LowLevelGraphicsPostScriptRenderer.cpp(327) : warning C4100: "opacity" juce_LowLevelGraphicsPostScriptRenderer.cpp(331) : warning C4100: "quality" juce_LowLevelGraphicsPostScriptRenderer.cpp(458) : warning C4100: "fillEntireClipAsTiles" juce_KeyMappingEditorComponent.cpp(69) : warning C4100: "isDown" juce_KeyMappingEditorComponent.cpp(69) : warning C4100: "isOver" juce_TreeView.cpp(994) : warning C4100: "files" juce_TreeView.cpp(1009) : warning C4100: "files" juce_TreeView.cpp(1019) : warning C4100: "sourceComponent" juce_TreeView.cpp(1019) : warning C4100: "sourceDescription" juce_TreeView.cpp(1034) : warning C4100: "sourceComponent" juce_TreeView.cpp(1034) : warning C4100: "sourceDescription" juce_TreeView.cpp(1275) : warning C4100: "files" juce_TreeView.cpp(1280) : warning C4100: "insertIndex" juce_TreeView.cpp(1280) : warning C4100: "files" juce_TreeView.cpp(1284) : warning C4100: "sourceComponent" juce_TreeView.cpp(1284) : warning C4100: "sourceDescription" juce_TreeView.cpp(1289) : warning C4100: "insertIndex" juce_TreeView.cpp(1289) : warning C4100: "sourceComponent" juce_TreeView.cpp(1289) : warning C4100: "sourceDescription" juce_ListBox.cpp(1001) : warning C4100: "row" juce_Label.cpp(223) : warning C4100: "editorComponent" juce_Label.cpp(227) : warning C4100: "editorComponent" juce_ValueTree.cpp(441) : warning C4100: "undoManager" juce_ValueTree.cpp(593) : warning C4100: "tree" juce_ValueTree.cpp(599) : warning C4100: "tree" juce_ValueTree.cpp(600) : warning C4100: "tree" juce_win32_FileChooser.cpp(151) : warning C4100: "selectsFiles"
copy constructor could not be generated:

juce_ButtonPropertyComponent.h(79) : warning C4511: "juce::ButtonPropertyComponent" juce_GenericAudioProcessorEditor.h(60) : warning C4511: "juce::GenericAudioProcessorEditor" juce_GenericAudioProcessorEditor.cpp(123) : warning C4511: "juce::ProcessorParameterPropertyComp"
assignment operator could not be generated:

juce_ButtonPropertyComponent.h(79) : warning C4512: "juce::ButtonPropertyComponent" juce_MouseHoverDetector.h(126) : warning C4512: "juce::MouseHoverDetector" juce_GenericAudioProcessorEditor.h(60) : warning C4512: "juce::GenericAudioProcessorEditor" juce_GenericAudioProcessorEditor.cpp(123) : warning C4512: "juce::ProcessorParameterPropertyComp"


#11

Hmm - some of that is really old code, maybe you’re just building with the warning level higher than me. Thanks, I’ll do some tidying up.