Skip to content

Commit fe21ac7

Browse files
committed
Fix compiler warnings
1 parent 23a7116 commit fe21ac7

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

lib/lsof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ enum lsof_error lsof_avoid_blocking(struct lsof_context *ctx, int avoid) {
107107
return LSOF_ERROR_INVALID_ARGUMENT;
108108
}
109109
Fblock = avoid;
110-
return LSOF_EXIT_SUCCESS;
110+
return LSOF_SUCCESS;
111111
}
112112

113113
API_EXPORT

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ int main(int argc, char *argv[]) {
13011301
else
13021302
slp = (struct lproc **)realloc((MALLOC_P *)slp, len);
13031303
if (!slp) {
1304-
(void)fprintf(stderr, "%s: no space for %d sort pointers\n",
1304+
(void)fprintf(stderr, "%s: no space for %zu sort pointers\n",
13051305
Pn, Nlproc);
13061306
Error(ctx);
13071307
}

src/usage.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ static void report_HASDCACHE(struct lsof_context *ctx, /* context */
221221
* report_HASKERNIDCK() -- report HASKERNIDCK state
222222
*/
223223

224-
static void report_HASKERNIDCK(pfx, verb) char *pfx; /* prefix (NULL if none) */
225-
char *verb; /* verb (NULL if none) */
226-
{
224+
static void report_HASKERNIDCK(char *pfx, /* prefix (NULL if none) */
225+
char *verb /* verb (NULL if none) */
226+
) {
227227
(void)fprintf(stderr, "%sernel ID check %s%s%s.\n", pfx ? pfx : "",
228228
verb ? verb : "", verb ? " " : "",
229229

@@ -240,10 +240,10 @@ char *verb; /* verb (NULL if none) */
240240
* report_SECURITY() -- report *SECURITY states
241241
*/
242242

243-
static void report_SECURITY(pfx, punct) char *pfx; /* prefix (NULL if none) */
244-
char *punct; /* short foem punctuation
245-
* (NULL if none) */
246-
{
243+
static void report_SECURITY(char *pfx, /* prefix (NULL if none) */
244+
char *punct /* short foem punctuation
245+
* (NULL if none) */
246+
) {
247247
fprintf(stderr, "%s%s can list all files%s", pfx ? pfx : "",
248248

249249
#if defined(HASSECURITY)
@@ -264,11 +264,10 @@ char *punct; /* short foem punctuation
264264
* report_WARNDEVACCESS() -- report WEARNDEVACCESS state
265265
*/
266266

267-
static void report_WARNDEVACCESS(pfx, verb,
268-
punct) char *pfx; /* prefix (NULL if none) */
269-
char *verb; /* verb (NULL if none) */
270-
char *punct; /* punctuation */
271-
{
267+
static void report_WARNDEVACCESS(char *pfx, /* prefix (NULL if none) */
268+
char *verb, /* verb (NULL if none) */
269+
char *punct /* punctuation */
270+
) {
272271
(void)fprintf(stderr, "%s/dev warnings %s%s%s%s", pfx ? pfx : "",
273272
verb ? verb : "", verb ? " " : "",
274273

0 commit comments

Comments
 (0)