Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 22d1cc39 authored by Alexander Kruppa's avatar Alexander Kruppa :coffee:
Browse files

Avoid warnings about unused variable and parameters

parent 6b88ce20
No related branches found
No related tags found
1 merge request!52Allow mmap-ing s data
...@@ -49,6 +49,7 @@ SOFTWARE. ...@@ -49,6 +49,7 @@ SOFTWARE.
/* needed to declare GetComputerName() for write_resumefile_line() */ /* needed to declare GetComputerName() for write_resumefile_line() */
#include <windows.h> #include <windows.h>
#endif #endif
#include "basicdefs.h"
/* Reads a string of characters from fd while they match the string s. /* Reads a string of characters from fd while they match the string s.
Returns the number of matching characters that were read. Returns the number of matching characters that were read.
...@@ -824,7 +825,6 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1) ...@@ -824,7 +825,6 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1)
return 1; return 1;
} }
const unsigned char host_is_le = htole32(1) == 1 ? 1 : 0;
s_file_header_t header; s_file_header_t header;
if (fread_perror(&header, sizeof(s_file_header_t), 1, file, fn, "header", 1)) if (fread_perror(&header, sizeof(s_file_header_t), 1, file, fn, "header", 1))
return 1; return 1;
...@@ -855,6 +855,7 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1) ...@@ -855,6 +855,7 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1)
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (want_mmap != 0) { if (want_mmap != 0) {
const unsigned char host_is_le = htole32(1) == 1 ? 1 : 0;
/* printf("Using mmap() for s data\n"); */ /* printf("Using mmap() for s data\n"); */
if (header.is_le != host_is_le) { if (header.is_le != host_is_le) {
...@@ -962,7 +963,7 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1) ...@@ -962,7 +963,7 @@ read_s_from_file (mpz_t s, const char *fn, int want_mmap, double B1)
} }
void void
free_s_data(int want_mmap, mpz_t s) free_s_data(ATTRIBUTE_UNUSED int want_mmap, ATTRIBUTE_UNUSED mpz_t s)
{ {
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
const int nr_limbs = s->_mp_size; const int nr_limbs = s->_mp_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment