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 7596763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:59:50+00:00 2026-05-30T21:59:50+00:00

The code works correctly, but I am getting the warning Argument in message expression

  • 0

The code works correctly, but I am getting the warning “Argument in message expression is an initialized value” for this piece of code:

    NSString *quality;
    switch(theItem.quality) {
        case 1:
            quality = @"UNDEF, Set it up!";
            break;
        case 2:
            quality = @"G, (Good)";
            break;
        case 3:
            quality = @"VG, (Very Good)";
            break;
        case 4:
            quality = @"F, (Fine)";
            break;
        case 5:
            quality = @"VF, (Very Fine)";
            break;
        case 6:
            quality = @"XF, (Extra Fine)";
            break;
        case 7:
            quality = @"UNC, (Uncirculated)";
            break;
        case 8:
            quality = @"PROOF, (Proof)";
            break;
    }

    str = [NSString stringWithFormat:@"%@", quality];

Is it some issue or it’s nothing and I can ignore it?
Also, is it ok to initialize NSString this way -> NSString *quality;?

  • 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-30T21:59:51+00:00Added an answer on May 30, 2026 at 9:59 pm

    Did you mean “uninitialized value”? If none of your case statements match, the quality variable will end up being uninitialized, which will likely crash once it gets to the +stringWithFormat:. You can either initialize quality with a default value (perhaps nil), or you can provide a default statement in your switch that initializes it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following code,the hover function works correctly, but when clicked, loses the clicked_no_event_box
This code works correctly to make a web service call: int numberOfGuests = Convert.ToInt32(search.Guest);
I'm getting stair-step output like this My program works correctly, except that when I
This code works when I have data rows returned for the messages object but
here is my code it shares the folder but that does not work correctly
Currently my code below works fine but it's a bit of overkill. In my
I have some Python code that works correctly when I use python.exe to run
I have a little bit of Javascript that almost works correctly. Here's the code:
The following code does not work correctly on Windows (but does on Linux): sock
I have this piece of code which gives to SAXParseError i.e., it is not

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.