Project

General

Profile

Bug #11441

th_tools: NULL pointer errors

Added by Toomas Soome about 1 month ago. Updated 25 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    th_define.c: In function 'walk_callback':
    th_define.c:1694:39: error: comparison between pointer and integer [-Werror]
       if (strcmp(driver_name, warg->name) == NULL &&
                                           ^~
    th_define.c: In function 'main':
    th_define.c:2117:35: error: comparison between pointer and integer [-Werror]
        else if (strcmp(optarg, "PIO") == NULL)
                                       ^~
    th_define.c:2119:35: error: comparison between pointer and integer [-Werror]
        else if (strcmp(optarg, "DMA") == NULL)
                                       ^~
    th_define.c:2121:47: error: comparison between pointer and integer [-Werror]
        else if (strcmp(optarg, "U4FT_ACC_NO_PIO") == NULL)
                                                   ^~
    th_define.c:2123:47: error: comparison between pointer and integer [-Werror]
        else if (strcmp(optarg, "U4FT_ACC_NO_DMA") == NULL)
                                                   ^~

    th_manage.c: In function 'main':
    th_manage.c:92:45: error: comparison between pointer and integer [-Werror]
        if (strcmp(argv[2], cmd_table[i].string) == NULL) {
                                                 ^~
    th_manage.c:118:45: error: comparison between pointer and integer [-Werror]
        if (strcmp(argv[3], cmd_table[i].string) == NULL) {
                                                 ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 25 days ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

git commit 0afbf5395cf4f4b8d9381a23f852c72b01ec43a4

commit  0afbf5395cf4f4b8d9381a23f852c72b01ec43a4
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-30T20:12:43.000Z

    11441 th_tools: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF