Uploaded image for project: 'Snowstorm'
  1. Snowstorm
  2. STORM-164

Cannot compile Snowglobe OR SLViewer - Compile error in llvosky.h for Linux

    Details

    • Type: Defect
    • Status: Closed
    • Priority: Showstopper
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Sprint 4, Viewer 2.2.0
    • Labels:
      None
    • Environment:
      Ubuntu Karmic, latest gcc, everything
    • Patch attached:
      Patch attached

      Description

      /home/spstarr/snowglobe-trunk/indra/newview/llvosky.h: In static member function 'static S32 LLSkyTex::stepCurrent()':
      /home/spstarr/snowglobe-trunk/indra/newview/llvosky.h:150: error: operation on 'LLSkyTex::sCurrent' may be undefined
      make[2]: *** [newview/CMakeFiles/secondlife-bin.dir/llagent.cpp.o] Error 1

      Compile Fix below:
      ===========

      Index: indra/newview/llvosky.h
      ===================================================================
      — indra/newview/llvosky.h (revision 2768)
      +++ indra/newview/llvosky.h (working copy)
      @@ -147,7 +147,7 @@

      static S32 getResolution()

      { return sResolution; }

      static S32 getCurrent()

      { return sCurrent; }
      • static S32 stepCurrent() { return (sCurrent = ++sCurrent % 2); }

        + static S32 stepCurrent()

        { S32 tmp = (++sCurrent % 2); sCurrent = tmp; return (sCurrent); }

        static S32 getNext()

        { return ((sCurrent+1) % 2); }

        static S32 getWhich(const BOOL curr)

        { return curr ? sCurrent : getNext(); }

      Please commit, works for me. It is undefined behavour to set and assign a changing variable.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shawn.kaufmat Shawn Kaufmat
              Extended Group Visibility:
              jira-users
              Prod Owner Approved:
              Aimee Linden (Disabled)
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes Time Not Required
                30m