1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Warning messages compiling C program

Discussion in 'C' started by puth, Sep 7, 2010.

  1. puth

    puth New Member

    Joined:
    Sep 7, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    When compiling a C program i get the following warnings.How do i modify the code to remove these warning messages?

    1) "test.c", line 614: warning #4212-D: mismatch between character pointer
    types "unsigned char *" and "char *"
    p_data = m_lines[p_text_idx];

    p_data is defined as char *p_data_text = NULL;
    m_lines is defined as static unsigned char **m_lines;


    2) "test.c", line 919: warning #2513-D: a value of type "int" cannot be
    assigned to an entity of type "char *"
    if ((cp = strrchr(p_file_path, '/')) == NULL)
    ^

    where char *cp = NULL;
    and char p_file_path[MAXPATHLEN];


    3) "test.c", line 1033: warning #4212-D: mismatch between character pointer
    types "unsigned char *" and "char *"
    p_result = m_nls_lines[p_nls_idx] + p_len;

    where char *p_result = not_found; and static unsigned char **m_nls_lines = NULL;

    Thanks,
    Puth
     

Share This Page