Skip to content

Minor bugs #3

@mateuszkobak

Description

@mateuszkobak
  1. Implicit casting uint8_t * to char *.
    Here is an example, but there are more places where this is done.

    i8_ret = cognit_http_send(ui8_payload, payload_len, &t_http_config);

    You can use -Wpointer-sign compilation flag

  2. Function was supposed to be called, but no arguments (-Waddress):
    Here:


    and here:
    if (is_requirement_upload_limit_reached)

  3. const qualifier is discarded in a few places (-Wdiscarded-qualifiers)

  4. Value may be used uninitialized (-Wmaybe-uninitialized)

    return (res == CURLE_OK) ? 0 : -1;

    but there is also some payload_len uninitialized.

In general, I would suggest compiling with more warnings (-Wall) and at least reading through all of them, as there may be some more issues then the ones I have listed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions