Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Changed {XMIT,FLAG}_DEL_START back to {XMIT,FLAG}_TOP_DIR.
[rsync/rsync.git]
/
popt
/
popthelp.c
diff --git
a/popt/popthelp.c
b/popt/popthelp.c
index
17adc6f
..
154e2c5
100644
(file)
--- a/
popt/popthelp.c
+++ b/
popt/popthelp.c
@@
-17,9
+17,9
@@
* @param key option(s)
*/
static void displayArgs(poptContext con,
* @param key option(s)
*/
static void displayArgs(poptContext con,
- /*@unused@*/
enum poptCallbackReason foo
,
+ /*@unused@*/
UNUSED(enum poptCallbackReason foo)
,
struct poptOption * key,
struct poptOption * key,
- /*@unused@*/
const char * arg, /*@unused@*/ void * data
)
+ /*@unused@*/
UNUSED(const char * arg), /*@unused@*/ UNUSED(void * data)
)
/*@globals fileSystem@*/
/*@modifies fileSystem@*/
{
/*@globals fileSystem@*/
/*@modifies fileSystem@*/
{
@@
-63,7
+63,7
@@
struct poptOption poptHelpOptions[] = {
/**
* @param table option(s)
*/
/**
* @param table option(s)
*/
-/*@observer@*/ /*@null@*/ static const char *
const
+/*@observer@*/ /*@null@*/ static const char *
getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
/*@*/
{
getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
/*@*/
{
@@
-81,7
+81,7
@@
getTableTranslationDomain(/*@null@*/ const struct poptOption *table)
* @param opt option(s)
* @param translation_domain translation domain
*/
* @param opt option(s)
* @param translation_domain translation domain
*/
-/*@observer@*/ /*@null@*/ static const char *
const
+/*@observer@*/ /*@null@*/ static const char *
getArgDescrip(const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: wazzup? */
/*@null@*/ const char * translation_domain)
getArgDescrip(const struct poptOption * opt,
/*@-paramuse@*/ /* FIX: wazzup? */
/*@null@*/ const char * translation_domain)
@@
-134,19
+134,23
@@
singleOptionDefaultValue(int lineLength,
case POPT_ARG_VAL:
case POPT_ARG_INT:
{ long aLong = *((int *)opt->arg);
case POPT_ARG_VAL:
case POPT_ARG_INT:
{ long aLong = *((int *)opt->arg);
- le += sprintf(le, "%ld", aLong);
+ sprintf(le, "%ld", aLong);
+ le += strlen(le);
} break;
case POPT_ARG_LONG:
{ long aLong = *((long *)opt->arg);
} break;
case POPT_ARG_LONG:
{ long aLong = *((long *)opt->arg);
- le += sprintf(le, "%ld", aLong);
+ sprintf(le, "%ld", aLong);
+ le += strlen(le);
} break;
case POPT_ARG_FLOAT:
{ double aDouble = *((float *)opt->arg);
} break;
case POPT_ARG_FLOAT:
{ double aDouble = *((float *)opt->arg);
- le += sprintf(le, "%g", aDouble);
+ sprintf(le, "%g", aDouble);
+ le += strlen(le);
} break;
case POPT_ARG_DOUBLE:
{ double aDouble = *((double *)opt->arg);
} break;
case POPT_ARG_DOUBLE:
{ double aDouble = *((double *)opt->arg);
- le += sprintf(le, "%g", aDouble);
+ sprintf(le, "%g", aDouble);
+ le += strlen(le);
} break;
case POPT_ARG_STRING:
{ const char * s = *(const char **)opt->arg;
} break;
case POPT_ARG_STRING:
{ const char * s = *(const char **)opt->arg;
@@
-187,11
+191,11
@@
static void singleOptionHelp(FILE * fp, int maxLeftCol,
{
int indentLength = maxLeftCol + 5;
int lineLength = 79 - indentLength;
{
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;
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. */
int nb = maxLeftCol + 1;
/* Make sure there's more than enough room in target buffer. */
@@
-271,7
+275,8
@@
static void singleOptionHelp(FILE * fp, int maxLeftCol,
*le++ = '=';
if (negate) *le++ = '~';
/*@-formatconst@*/
*le++ = '=';
if (negate) *le++ = '~';
/*@-formatconst@*/
- le += sprintf(le, (ops ? "0x%lx" : "%ld"), aLong);
+ sprintf(le, (ops ? "0x%lx" : "%ld"), aLong);
+ le += strlen(le);
/*@=formatconst@*/
*le++ = ']';
} break;
/*@=formatconst@*/
*le++ = ']';
} break;
@@
-309,7
+314,7
@@
static void singleOptionHelp(FILE * fp, int maxLeftCol,
helpLength = strlen(help);
while (helpLength > lineLength) {
helpLength = strlen(help);
while (helpLength > lineLength) {
- const char * ch;
+ const
unsigned
char * ch;
char format[10];
ch = help + lineLength - 1;
char format[10];
ch = help + lineLength - 1;
@@
-470,7
+475,7
@@
static int showHelpIntro(poptContext con, FILE * fp)
return len;
}
return len;
}
-void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/
int flags
)
+void poptPrintHelp(poptContext con, FILE * fp, /*@unused@*/
UNUSED(int flags)
)
{
int leftColWidth;
{
int leftColWidth;
@@
-629,7
+634,7
@@
static int showShortOptions(const struct poptOption * opt, FILE * fp,
return strlen(s) + 4;
}
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;
{
int cursor;