djk's picture

Warning Level 4 cleanup

Project:The Open Toolkit library
Version:0.9.6
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

We are in the process of cleaning up warnings emitted at warning Level 4 through out our codebase and OpenTk has a fair number of XML documentaiton which we have descided to suppress for the time being since it is still in a beta stage.

The following warnings are left CS1658 is actually an XML documentation warning that the cref below is not correct. The others lool like they are either left over bits and pieces of code or new functionality that is not being used yet.

Can someone confirm if the warnings related to the JoyStick and MacOS are left over bits or new functionality? I will suppress them if its functioality to come for the time being.

        /// <summary>
        /// Enters the game loop of the GameWindow updating and rendering at the maximum possible frequency.
        /// </summary>
        /// <see cref="public virtual void Run(double update_frequency, double render_frequency)"/>
        public void Run()
        {
            if (disposed) throw new ObjectDisposedException("GameWindow");
            Run(0.0, 0.0);
        }

GameWindow.cs(437,24): warning CS1658: Identifier expected; 'public' is a keyword. See also error CS1041.
GameWindow.cs(452,24): warning CS1658: Identifier expected; 'public' is a keyword. See also error CS1041.
Input\JoystickDevice.cs(160,17): warning CS0169: The field 'OpenTK.Input.JoystickDevice.details' is never used
Platform\MacOS\AglContext.cs(32,16): warning CS0169: The field 'OpenTK.Platform.MacOS.AglContext.displayID' is never used
Platform\MacOS\CarbonGLNative.cs(644,34): warning CS0067: The event 'OpenTK.Platform.MacOS.CarbonGLNative.Create' is never used
Platform\Windows\WinMMJoystick.cs(46,32): warning CS0414: The field 'OpenTK.Platform.Windows.WinMMJoystick.RegistryJoyName' is assigned but its value is never used
Fonts\TextureFont.cs(228,28): warning CS1658: Identifier expected; 'public' is a keyword. See also error CS1041.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kanato's picture

#1

MacOS.CarbonGLNative.Create is part of the INativeGLWindow interface, so removing it would cause compilation failure. I probably should fix it so that it's actually called when the native window is created.

MacOS.AglContext.displayID is something I meant to eventually use to keep track of which display adapter was specified when the context was created. But the API for specifying which display adapter to go full screen on is not in OpenTK, so it can be safely commented out for now.

the Fiddler's picture

#2

Status:open» fixed

Fixed/suppressed all visible build warnings in OpenTK and marked several items in "Todo" comments. A release build should now contain no warnings other than missing comments (which are valid and will be fixed in due time).

OpenTK.Utilities didn't get the same treatment (by design).

the Fiddler's picture

#3

Version:0.9.4» 0.9.6
Status:fixed» closed

Closing bugs fixed in 0.9.6.