Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
37101856
Commit
37101856
authored
Jan 27, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silenced some compiler warnings.
parent
65fc84b3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
20 deletions
+22
-20
popt.c
popt/popt.c
+4
-4
popt.h
popt/popt.h
+1
-1
poptconfig.c
popt/poptconfig.c
+3
-2
popthelp.c
popt/popthelp.c
+10
-10
poptparse.c
popt/poptparse.c
+3
-3
system.h
popt/system.h
+1
-0
No files found.
popt/popt.c
View file @
37101856
...
...
@@ -907,10 +907,10 @@ int poptGetNextOpt(poptContext con)
#ifndef DBL_EPSILON
#define DBL_EPSILON 2.2204460492503131e-16
#endif
#define
_ABS(a)
((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
if
((
_ABS
(
aDouble
)
-
FLT_MAX
)
>
DBL_EPSILON
)
#define
MY_ABS(a)
((((a) - 0.0) < DBL_EPSILON) ? -(a) : (a))
if
((
MY
_ABS
(
aDouble
)
-
FLT_MAX
)
>
DBL_EPSILON
)
return
POPT_ERROR_OVERFLOW
;
if
((
FLT_MIN
-
_ABS
(
aDouble
))
>
DBL_EPSILON
)
if
((
FLT_MIN
-
MY
_ABS
(
aDouble
))
>
DBL_EPSILON
)
return
POPT_ERROR_OVERFLOW
;
*
((
float
*
)
opt
->
arg
)
=
aDouble
;
}
...
...
@@ -1055,7 +1055,7 @@ poptContext poptFreeContext(poptContext con)
}
int
poptAddAlias
(
poptContext
con
,
struct
poptAlias
alias
,
/*@unused@*/
int
flags
)
/*@unused@*/
UNUSED
(
int
flags
)
)
{
poptItem
item
=
(
poptItem
)
alloca
(
sizeof
(
*
item
));
memset
(
item
,
0
,
sizeof
(
*
item
));
...
...
popt/popt.h
View file @
37101856
...
...
@@ -363,7 +363,7 @@ int poptDupArgv(int argc, /*@null@*/ const char **argv,
* @retval argcPtr address of returned no. of arguments
* @retval argvPtr address of returned argument array
*/
int
poptParseArgvString
(
const
char
*
s
,
int
poptParseArgvString
(
const
unsigned
char
*
s
,
/*@out@*/
int
*
argcPtr
,
/*@out@*/
const
char
***
argvPtr
)
/*@modifies *argcPtr, *argvPtr @*/
;
...
...
popt/poptconfig.c
View file @
37101856
...
...
@@ -10,7 +10,7 @@
#include "poptint.h"
/*@-compmempass@*/
/* FIX: item->option.longName kept, not dependent. */
static
void
configLine
(
poptContext
con
,
char
*
line
)
static
void
configLine
(
poptContext
con
,
unsigned
char
*
line
)
/*@modifies con @*/
{
/*@-type@*/
...
...
@@ -159,7 +159,8 @@ int poptReadConfigFile(poptContext con, const char * fn)
return
0
;
}
int
poptReadDefaultConfig
(
poptContext
con
,
/*@unused@*/
int
useEnv
)
{
int
poptReadDefaultConfig
(
poptContext
con
,
/*@unused@*/
UNUSED
(
int
useEnv
))
{
char
*
fn
,
*
home
;
int
rc
;
...
...
popt/popthelp.c
View file @
37101856
...
...
@@ -17,9 +17,9 @@
* @param key option(s)
*/
static
void
displayArgs
(
poptContext
con
,
/*@unused@*/
enum
poptCallbackReason
foo
,
/*@unused@*/
UNUSED
(
enum
poptCallbackReason
foo
)
,
struct
poptOption
*
key
,
/*@unused@*/
const
char
*
arg
,
/*@unused@*/
void
*
data
)
/*@unused@*/
UNUSED
(
const
char
*
arg
),
/*@unused@*/
UNUSED
(
void
*
data
)
)
/*@globals fileSystem@*/
/*@modifies fileSystem@*/
{
...
...
@@ -84,7 +84,7 @@ getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
/*@observer@*/
/*@null@*/
static
const
char
*
const
getArgDescrip
(
const
struct
poptOption
*
opt
,
/*@-paramuse@*/
/* FIX: wazzup? */
/*@null@*/
const
char
*
translation_domain
)
/*@null@*/
UNUSED
(
const
char
*
translation_domain
)
)
/*@=paramuse@*/
/*@*/
{
...
...
@@ -115,7 +115,7 @@ static /*@only@*/ /*@null@*/ char *
singleOptionDefaultValue
(
int
lineLength
,
const
struct
poptOption
*
opt
,
/*@-paramuse@*/
/* FIX: i18n macros disable with lclint */
/*@null@*/
const
char
*
translation_domain
)
/*@null@*/
UNUSED
(
const
char
*
translation_domain
)
)
/*@=paramuse@*/
/*@*/
{
...
...
@@ -191,11 +191,11 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol,
{
int
indentLength
=
maxLeftCol
+
5
;
int
lineLength
=
79
-
indentLength
;
const
char
*
help
=
D_
(
translation_domain
,
opt
->
descrip
);
const
unsigned
char
*
help
=
D_
(
translation_domain
,
opt
->
descrip
);
const
char
*
argDescrip
=
getArgDescrip
(
opt
,
translation_domain
);
int
helpLength
;
char
*
defs
=
NULL
;
char
*
left
;
unsigned
char
*
defs
=
NULL
;
unsigned
char
*
left
;
int
nb
=
maxLeftCol
+
1
;
/* Make sure there's more than enough room in target buffer. */
...
...
@@ -314,7 +314,7 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol,
helpLength
=
strlen
(
help
);
while
(
helpLength
>
lineLength
)
{
const
char
*
ch
;
const
unsigned
char
*
ch
;
char
format
[
10
];
ch
=
help
+
lineLength
-
1
;
...
...
@@ -475,7 +475,7 @@ static int showHelpIntro(poptContext con, FILE * fp)
return
len
;
}
void
poptPrintHelp
(
poptContext
con
,
FILE
*
fp
,
/*@unused@*/
int
flags
)
void
poptPrintHelp
(
poptContext
con
,
FILE
*
fp
,
/*@unused@*/
UNUSED
(
int
flags
)
)
{
int
leftColWidth
;
...
...
@@ -634,7 +634,7 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp,
return
strlen
(
s
)
+
4
;
}
void
poptPrintUsage
(
poptContext
con
,
FILE
*
fp
,
/*@unused@*/
int
flags
)
void
poptPrintUsage
(
poptContext
con
,
FILE
*
fp
,
/*@unused@*/
UNUSED
(
int
flags
)
)
{
int
cursor
;
...
...
popt/poptparse.c
View file @
37101856
...
...
@@ -51,10 +51,10 @@ int poptDupArgv(int argc, const char **argv,
return
0
;
}
int
poptParseArgvString
(
const
char
*
s
,
int
*
argcPtr
,
const
char
***
argvPtr
)
int
poptParseArgvString
(
const
unsigned
char
*
s
,
int
*
argcPtr
,
const
char
***
argvPtr
)
{
const
char
*
src
;
char
quote
=
'\0'
;
const
unsigned
char
*
src
;
unsigned
char
quote
=
'\0'
;
int
argvAlloced
=
POPT_ARGV_ARRAY_GROW_DELTA
;
const
char
**
argv
=
malloc
(
sizeof
(
*
argv
)
*
argvAlloced
);
int
argc
=
0
;
...
...
popt/system.h
View file @
37101856
...
...
@@ -69,5 +69,6 @@ char *alloca ();
#define xstrdup(_str) strdup(_str)
#endif
/* HAVE_MCHECK_H && defined(__GNUC__) */
#define UNUSED(x) x __attribute__((__unused__))
#include "popt.h"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment