Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7174595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:05:23+00:00 2026-05-28T16:05:23+00:00

im working on a old code and i have this warning message: Passed-by-value struct

  • 0

im working on a old code and i have this warning message:
Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: ‘origin.x’). If i could get dome help i would be very thankful 🙂

The code im using:

- (void)positionScroller
{
    CGRect screenFrame = [[UIScreen mainScreen] bounds];
    CGRect scrollerRect;

    if( self.interfaceOrientation == UIInterfaceOrientationPortrait || self.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown )
    {
        scrollerRect = CGRectMake( 0, 0, screenFrame.size.width, screenFrame.size.height );
    }
    else if( self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight )
    {
        scrollerRect = CGRectMake( 0, 0, screenFrame.size.height, screenFrame.size.width );
    }

    _scroller.frame = scrollerRect;   <---This is where the compiler gives the warning
}

Best Regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:05:24+00:00Added an answer on May 28, 2026 at 4:05 pm

    You can easily get rid of the warning like this:

    - (void)positionScroller 
    { 
        CGRect screenFrame = [[UIScreen mainScreen] bounds]; 
        CGRect scrollerRect; 
    
        if( self.interfaceOrientation == UIInterfaceOrientationPortrait || self.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ) 
        { 
            scrollerRect = CGRectMake( 0, 0, screenFrame.size.width, screenFrame.size.height ); 
        } 
        else  
        { 
            scrollerRect = CGRectMake( 0, 0, screenFrame.size.height, screenFrame.size.width ); 
        } 
    
        _scroller.frame = scrollerRect;   <---This is where the compiler gives the warning 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just been re-working an old bit of compiler-like code written using bison.
working on an old translation sample code for windows phone 7. Recently, I have
At work, I am working with this old legacy code modified Cake-PHP code that
Hi all I have this code that doesnt seem to be working. I think
New to php .I'm working on an old code in which I have to
I'm working on old code that relies heavily on the exception specifications behavior described
I am working with old ASP code and I am not sure about semantics
I'm working with some old PHP code that has a lot of the following:
I'm working on bringing some old code from 1998 up to the 21st century.
I have the unfortunate task of cleaning up a bunch of old ColdFusion code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.