mirror of https://github.com/BOINC/boinc.git
lib, nvcuda: Fix warnings from cppcheck reported by Toralf Förster.
This commit is contained in:
parent
0355298b0d
commit
3637e0f6da
|
@ -313,8 +313,8 @@ static int ImageListForTaskOldWithNames(
|
|||
QTMAddr listChunkAddr;
|
||||
QTMAddr elemSizeAddr;
|
||||
QTMAddr elemCountAddr;
|
||||
uint32_t elemCount;
|
||||
uint32_t elemSize;
|
||||
uint32_t elemCount = 0;
|
||||
uint32_t elemSize = 0;
|
||||
size_t listChunkSize;
|
||||
enum { // constants related to the array elements
|
||||
kValidOffset = 12, // offset to "valid" field
|
||||
|
|
|
@ -116,7 +116,7 @@ int procinfo_setup(PROC_MAP& pm) {
|
|||
|
||||
while (1) {
|
||||
p.clear();
|
||||
c = fscanf(fd, "%d%d%d%d%ld%d%d:%lf ",
|
||||
c = fscanf(fd, "%d%d%d%d%lu%d%d:%lf ",
|
||||
&p.id,
|
||||
&p.parentid,
|
||||
&real_mem,
|
||||
|
|
|
@ -61,6 +61,7 @@ int main(int argc, char** argv) {
|
|||
REAL* h_idata;
|
||||
MFILE out;
|
||||
FILE* state, *infile;
|
||||
double num=0;
|
||||
|
||||
generate_random_input_file(MATRIX_SIZE); //call this if you don't want to
|
||||
//construct the input file manually
|
||||
|
@ -111,7 +112,8 @@ int main(int argc, char** argv) {
|
|||
fscanf(state,"%d",&dimension);
|
||||
cudaMallocHost((void **)&h_idata,dimension*dimension*sizeof(REAL));
|
||||
for (int i=0;i<dimension*dimension;++i) {
|
||||
fscanf(state, "%lf", &h_idata[i]);
|
||||
fscanf(state, "%lf", &num);
|
||||
h_idata[i] = num;
|
||||
}
|
||||
}
|
||||
fclose(state);
|
||||
|
|
Loading…
Reference in New Issue