Ok for me
You should test on != 1. The following code gives 0 in the first call, not EOF. So MYVAR= will be catch but not MYVAR=unexpected_string
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main () {
int day, year;
char weekday[20], month[20], dtm[100];
strcpy( dtm, "Saturday" );
int rc = sscanf( dtm, "%d", &year );
printf("%d\n", rc );
strcpy( dtm, "" );
rc = sscanf( dtm, "%d", &year );
printf("%d\n", rc );
return(0);
}
I am rebasing it.
I'll revert that one, seems not needed
It crashed without that.
I will double check this one.
Should be considered after !449
Could also be solved by using cudaMemset/hipMemset on CUDA/HIP compute units.