Skip to content

Commit c3bfac2

Browse files
committed
LAGraph_Version: Use char array instead of pointer as argument
Enforce use of array with right size, prevent memory errors. Found by GCC 16 (-Warray-paramter).
1 parent a439d7c commit c3bfac2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/LAGraph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ LAGRAPH_PUBLIC extern GrB_Semiring
859859
*
860860
* @param[out] version_number an array of size 3; with the major, minor,
861861
* and update versions of LAGraph, in that order.
862-
* @param[out] version_date an array of size >= LAGraph_MSG_LEN, returned
862+
* @param[out] version_date an array of size LAGraph_MSG_LEN, returned
863863
* with the date of this version of LAGraph.
864864
* @param[in,out] msg any error messages.
865865
*
@@ -872,7 +872,7 @@ int LAGraph_Version
872872
(
873873
// output:
874874
int version_number [3], // user-provided array of size 3
875-
char *version_date, // user-provided array of size >= LAGRAPH_MSG_LEN
875+
char version_date[LAGRAPH_MSG_LEN], // user-provided array of size LAGRAPH_MSG_LEN
876876
char *msg
877877
) ;
878878

0 commit comments

Comments
 (0)