Branch Coverage

ext/xxHash/xxhsum.c
Criterion Covered Total %
branch 0 240 0.0


line true false branch
186 0 0 if (requiredMem > MAX_MEM) requiredMem = MAX_MEM;
188 0 0 while (!testmem) {
189 0 0 if (requiredMem > step) requiredMem -= step;
196 0 0 if (requiredMem > step) requiredMem -= step;
213 0 0 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */
0 0 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */
230 0 0 if (g_nbIterations<1) g_nbIterations=1;
231 0 0 for (iterationNb = 1; iterationNb <= g_nbIterations; iterationNb++) {
237 0 0 while (clock() == cStart); /* starts clock() at its exact beginning */
240 0 0 while (BMK_clockSpan(cStart) < TIMELOOP) {
242 0 0 for (i=0; i
247 0 0 if (timeS < fastestH) fastestH = timeS;
262 0 0 if (bufferSize>1)
269 0 0 if (bufferSize>1)
278 0 0 while (fileIdx
288 0 0 if ((inFile==NULL) || (inFileName==NULL)) {
296 0 0 if ((U64)benchedSize > inFileSize) benchedSize = (size_t)inFileSize;
297 0 0 if (benchedSize < inFileSize) {
302 0 0 if(!buffer) {
313 0 0 if(readSize != benchedSize) {
334 0 0 if(!buffer) {
351 0 0 if (r1==r2) DISPLAY("\rTest%3i : %08X == %08X ok ", nbTests, r1, r2);
363 0 0 if (r1!=r2) {
387 0 0 for (index=0; index
408 0 0 for (index=0; index
422 0 0 for (i=0; i
446 0 0 DISPLAYLEVEL(2, "Sanity check -- all tests ok\n");
458 0 0 for (index=length-1; index
466 0 0 for (index=0; index
482 0 0 while (readSize) {
528 0 0 if (fileName == stdinName) {
534 0 0 if (inFile==NULL) {
541 0 0 if(!buffer) {
552 0 0 while ( (infoFilenameSize < maxInfoFilenameSize)
553 0 0 &&(fileNameEnd[-1-infoFilenameSize] != '/')
554 0 0 &&(fileNameEnd[-1-infoFilenameSize] != '\\') )
582 0 0 BMK_display_BigEndian(&hcbe32, sizeof(hcbe32)) : BMK_display_LittleEndian(&hcbe32, sizeof(hcbe32));
590 0 0 BMK_display_BigEndian(&hcbe64, sizeof(hcbe64)) : BMK_display_LittleEndian(&hcbe64, sizeof(hcbe64));
608 0 0 if (fnTotal==0)
611 0 0 for (fnNb=0; fnNb
688 0 0 if (*lineBuf == NULL || *lineMax < 1) {
0 0 if (*lineBuf == NULL || *lineMax < 1) {
691 0 0 if(*lineBuf == NULL) return GetLine_outOfMemory;
696 0 0 if (c == EOF) {
700 0 0 if (len == 0) result = GetLine_eof;
705 0 0 if (len+1 >= *lineMax) {
710 0 0 if (newBufSize > MAX_LINE_LENGTH) newBufSize = MAX_LINE_LENGTH;
711 0 0 if (len+1 >= newBufSize) return GetLine_exceedMaxLineLength;
714 0 0 if (newLineBuf == NULL) return GetLine_outOfMemory;
720 0 0 if (c == '\n') break;
735 0 0 if (c >= '0' && c <= '9') {
0 0 if (c >= '0' && c <= '9') {
737 0 0 } else if (c >= 'A' && c <= 'F') {
0 0 } else if (c >= 'A' && c <= 'F') {
739 0 0 } else if (c >= 'a' && c <= 'f') {
0 0 } else if (c >= 'a' && c <= 'f') {
755 0 0 for (i = 0; i < dstSize; ++i) {
759 0 0 if (h0 < 0) return CanonicalFromString_invalidFormat;
762 0 0 if (h1 < 0) return CanonicalFromString_invalidFormat;
791 0 0 if (firstSpace == NULL || *secondSpace != ' ') return ParseLine_invalidFormat;
0 0 if (firstSpace == NULL || *secondSpace != ' ') return ParseLine_invalidFormat;
797 0 0 if (canonicalFromString(xxh32c->digest, sizeof(xxh32c->digest), line)
807 0 0 if (canonicalFromString(xxh64c->digest, sizeof(xxh64c->digest), line)
835 0 0 while (!report->quit) {
843 0 0 if (lineNumber == 0) {
853 0 0 if (getLineResult != GetLine_ok) {
854 0 0 if (getLineResult == GetLine_eof) break;
880 0 0 if (parseLine(&parsedLine, parseFileArg->lineBuf) != ParseLine_ok) {
882 0 0 if (parseFileArg->warn) {
889 0 0 if (report->xxhBits != 0 && report->xxhBits != parsedLine.xxhBits) {
0 0 if (report->xxhBits != 0 && report->xxhBits != parsedLine.xxhBits) {
893 0 0 if (parseFileArg->warn) {
901 0 0 if (report->xxhBits == 0) {
906 0 0 if (fp == NULL) {
915 0 0 if (xxh == XXH32_hashFromCanonical(&parsedLine.canonical.xxh32)) {
923 0 0 if (xxh == XXH64_hashFromCanonical(&parsedLine.canonical.xxh64)) {
943 0 0 if (!parseFileArg->statusOnly) {
952 0 0 if (lineStatus == LineStatus_hashOk) {
954 0 0 if (parseFileArg->quiet) b = 0;
959 0 0 if (b && !parseFileArg->statusOnly) {
0 0 if (b && !parseFileArg->statusOnly) {
960 0 0 DISPLAYRESULT("%s: %s\n", parsedLine.filename
998 0 0 if (displayEndianess != big_endian) {
1005 0 0 if (inFileName == stdinName) {
1013 0 0 if (inFile == NULL) {
1034 0 0 if (inFile != stdin) fclose(inFile);
1038 0 0 if (report->nProperlyFormattedLines == 0) {
1040 0 0 } else if (!statusOnly) {
1041 0 0 if (report->nImproperlyFormattedLines) {
1045 0 0 if (report->nOpenOrReadFailures) {
1049 0 0 if (report->nMismatchedChecksums) {
1057 0 0 && report->nMismatchedChecksums == 0
1058 0 0 && report->nOpenOrReadFailures == 0
1059 0 0 && (!strictMode || report->nImproperlyFormattedLines == 0)
0 0 && (!strictMode || report->nImproperlyFormattedLines == 0)
1060 0 0 && report->quit == 0;
0 0 && report->quit == 0;
1076 0 0 if (fnTotal==0) {
1080 0 0 for (fnNb=0; fnNb
1145 0 0 if (strstr(exename, "xxh32sum") != NULL) algo = algo_xxh32;
1147 0 0 for(i=1; i
1150 0 0 if(!argument) continue; /* Protection, if argument empty */
1152 0 0 if (!strcmp(argument, "--little-endian")) { displayEndianess = little_endian; continue; }
1153 0 0 if (!strcmp(argument, "--check")) { fileCheckMode = 1; continue; }
1154 0 0 if (!strcmp(argument, "--strict")) { strictMode = 1; continue; }
1155 0 0 if (!strcmp(argument, "--status")) { statusOnly = 1; continue; }
1156 0 0 if (!strcmp(argument, "--quiet")) { quiet = 1; continue; }
1157 0 0 if (!strcmp(argument, "--warn")) { warn = 1; continue; }
1158 0 0 if (!strcmp(argument, "--help")) { return usage_advanced(exename); }
1159 0 0 if (!strcmp(argument, "--version")) { DISPLAY(WELCOME_MESSAGE(exename)); return 0; }
1161 0 0 if (*argument!='-') {
1162 0 0 if (filenamesStart==0) filenamesStart=i; /* only supports a continuous list of filenames */
1169 0 0 while (*argument!=0) {
1214 0 0 while (argument[0]>='0' && argument[0]<='9')
1225 0 0 if (benchmarkMode) {
1228 0 0 if (filenamesStart==0) return BMK_benchInternal();
1233 0 0 if ( (filenamesStart==0) && IS_CONSOLE(stdin) ) return badusage(exename);
0 0 if ( (filenamesStart==0) && IS_CONSOLE(stdin) ) return badusage(exename);
1235 0 0 if (filenamesStart==0) filenamesStart = argc;
1236 0 0 if (fileCheckMode) {