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

  • Home
  • SEARCH
  • 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 6320707
In Process

The Archive Base Latest Questions

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

I have an array declared inside a user defined method. I use this array

  • 0

I have an array declared inside a user defined method. I use this array to store the values returned from the sqlite database. Then I use that value for further processing… But Xcode gives me the following warning at the array declaration.
“Value stored during initialization is never being read”
Here is my code:

 NSMutableArray *tempId=[NSMutableArray array];
NSString *sqlStr1=[NSString stringWithFormat:@"select deck_id from decksTable limit '%d' offset '%d'",1,deckID-1];
char *sql1 = (char*)[sqlStr1 UTF8String];
tempId=[appDelegate.dbConnection  fetchColumnFromTable:sql1 col:0];
NSNumber *tempint1 =[tempId objectAtIndex:0];
int actualDeckID=[tempint1 intValue];

Please help me out of this.

Note dbConnection is the database connection object and fetchColumnFromTable is a user defined method which returns the array of values fetched from database. Then i get the first value in NSNumber and convert it into integer to use it in my code. I get the above warnning at the declaration of the tempId array.

  • 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-24T16:01:29+00:00Added an answer on May 24, 2026 at 4:01 pm

    NSMutableArray *tempId=[NSMutableArray array]; is not necessary as the memory allocated by this statement is not used and you are pointing tempId to the array returned at tempId=[appDelegate.dbConnection fetchColumnFromTable:sql1 col:0];. So basically you can just declare the array and not initialise it. NSMutableArray *tempId;

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

Sidebar

Related Questions

I have this array declared inside my main() function: int VISITED[9][9]={{0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0},
I have a variable declared like this in a class: Entity *array[BOARD_SIZE][BOARD_SIZE]; I need
Say I have an array of Strings declared like this: String[] strings = new
I have the following array declared inside a header file. static const float elementsArray[300]
So, lets say in my main activity, i have an array declared like this,
I have declared my array like this: FT_Interface<4096> *to_make_ft[3] = { /* initialization with
I have a C++ array declared as mentioned below: CString carray[] = { A,
I have declared an array in the form: var refs = { 'EE810': Presence
I have a simple function in which an array is declared with size depending
I have a couple UIViewControllers that I am trying to access an array inside

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.