Open Bug 944205 Opened 11 years ago Updated 2 years ago

64bit OpenGL constants literals need to use proper type suffixes

Categories

(Core :: Graphics, defect)

defect

Tracking

()

People

(Reporter: bjacob, Unassigned)

Details

Attachments

(1 file)

Just spotted this flying over my terminal while building B2G:

/hack/mozilla-central/gfx/gl/SharedSurfaceGL.cpp:378: warning: integer constant is too large for 'long' type

The code is

bool
SharedSurface_GLTexture::WaitSync()
{
    MutexAutoLock lock(mMutex);
    if (!mSync) {
        // We must have used glFinish instead of glFenceSync.
        return true;
    }

    MOZ_ASSERT(mConsGL, "Did you forget to call a deferred `SetConsumerGL()`?");
    mConsGL->MakeCurrent();
    MOZ_ASSERT(mConsGL->IsExtensionSupported(GLContext::ARB_sync));

    mConsGL->fWaitSync(mSync,
                       0,
                       LOCAL_GL_TIMEOUT_IGNORED);  // <-- ### here ###
    mConsGL->fDeleteSync(mSync);
    mSync = 0;

    return true;
}

It looks like this could mean that the timeout value we pass to WaitSync isn't the one we intend to!
Summary: integer type mismatch could make glWaitSync receive a different timeout value than intended → 64bit OpenGL constants literals need to use proper type suffixes
It's not so bad after all.
Attachment #8339664 - Flags: review?(jgilbert)
Comment on attachment 8339664 [details] [diff] [review]
The glass is also half 0xFFFFFFFFFFFFFFFFull

Review of attachment 8339664 [details] [diff] [review]:
-----------------------------------------------------------------

Hah.
Attachment #8339664 - Flags: review?(jgilbert) → review+
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: