Skip to content

husky_lens_protocol_write_begin() returns wrong type #22

@bhelterline

Description

@bhelterline

The function husky_lens_protocol_write_begin() in HuskyLensProtocolCore.c returns the wrong type. It is supposed to return an unsigned char *

uint8_t* husky_lens_protocol_write_begin(uint8_t command){

but returns

return &send_buffer;

a pointer to a buffer of size 128. This is a warning on AVR, but an error for the raspberryPi Pico

c:\Users\xxx\libraries\HUSKYLENS\HuskyLensProtocolCore.c: In function 'husky_lens_protocol_write_begin':
c:\Users\xxx\libraries\HUSKYLENS\HuskyLensProtocolCore.c:135:12: error:
 returning 'uint8_t ()[128]' {aka 'unsigned char ()[128]'} from a function with
 incompatible return type 'uint8_t *' {aka 'unsigned char *'} [-Wincompatible-pointer-types]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions