Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ecm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIMMERMANN Paul
ecm
Commits
22d1cc39
Commit
22d1cc39
authored
9 months ago
by
Alexander Kruppa
Browse files
Options
Downloads
Patches
Plain Diff
Avoid warnings about unused variable and parameters
parent
6b88ce20
No related branches found
No related tags found
1 merge request
!52
Allow mmap-ing s data
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resume.c
+3
-2
3 additions, 2 deletions
resume.c
with
3 additions
and
2 deletions
resume.c
+
3
−
2
View file @
22d1cc39
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment