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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:18:35+00:00 2026-05-29T20:18:35+00:00

I can’t get rid of compiler warning assignment makes pointer from integer without a

  • 0

I can’t get rid of compiler warning “assignment makes pointer from integer without a cast” in following case:

    int sql_user(char** mysql_user_name, char** mysql_password, char** mysql_server, char **mysql_serverport, char** mysql_socket)
{
    int retval = -1;
    char **sub;
    char *contents;
    if(g_file_get_contents("mysqlsrv.def", &contents, NULL, NULL))
    {
        sub = g_strsplit(contents, "\n", -1);
        //here compiler warning: assignment makes pointer from integer without a cast

        *mysql_user_name  = sub[0];
        *mysql_password   = sub[1];
        *mysql_server     = sub[2];
        *mysql_serverport = sub[3];
        *mysql_socket     = sub[4];
        if (!strlen(sub[4])) *mysql_socket = NULL;
        retval = 0;
    }
    return retval;
}

Additionaly, In sub[4] is empty string (“”). Is here a way to save NULL instead to text file so it can be readed later as NULL without If (!strlen… condition?

Any help would be appreciated.

  • 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-29T20:18:36+00:00Added an answer on May 29, 2026 at 8:18 pm

    Sounds like g_strsplit() is not known (declared), so the compiler is assuming the default return type of int.
    I’d check your include files to make sure the one declaring g_strsplit() is included.

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

Sidebar

Related Questions

Can you cast a List<int> to List<string> somehow? I know I could loop through
Can I get a 'when to use' for these and others? <% %> <%#
Can anyone give me an example of how to return the following json simply
Can I be notified of the following events for an Activity: screenSizeWillChange screenSizeDidChange I
Can i get the source code for a WAMP stack installer somewhere? Any help
Can somebody point me a good strategy for security crosscutting concern without AOP for
Can't seem to get the Back Button to appear in a UINavigationController flow. I
Does anyone know how can I replace this 2 symbol below from the string
Can someone help me? I am trying to do something like the following: #include
Can someone explain the usage of the dollar sign here.. var updateProgressDiv = $get('updateProgressDiv');

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.