Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test program test-vector.c does not compile with GCC 14 #50

@frieben

Description

@frieben

The declaration of the two-dimensional arrays hori and vert prevents compilation of test-vector.c with GCC 14 because of a conflicting declaration of function giza_vector_float using the argument type (const float *) for those variables. Compilation succeeds after modifying the function call

giza_vector_float (n, m, hori, vert, 0, 1, 0, 1, scale, 0, affine, 1000.);

by casting the types of arguments hor and vert according to the declaration of giza_vector_float, thus

giza_vector_float (n, m, (float *) &hori, (float *) &vert, 0, 1, 0, 1, scale, 0, affine, 1000.); .

It might be preferable though to adjust the declaration of giza_vector_float etc. in giza.h using variable length arrays instead.

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