Bug Summary

File:afsd/vsys.c
Location:line 59, column 2
Description:Function call argument is an uninitialized value

Annotated Source Code

1/*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10#include <afsconfig.h>
11#include <afs/param.h>
12#include <stdio.h>
13#include <stdlib.h>
14#include <ctype.h>
15#include <string.h>
16#ifdef HAVE_UNISTD_H1
17#include <unistd.h>
18#endif
19#ifdef HAVE_STDINT_H1
20# include <stdint.h>
21#endif
22
23
24#include <afs/afs_args.h>
25
26#include "AFS_component_version_number.c"
27
28int
29main(int argc, char **argv)
30{
31 afs_int32 code;
32 int i, counter;
33 afs_int32 parms[6];
34 int numberFlag;
35
36 if (argc < 2) {
1
Taking false branch
37 printf("use: vsys <call number> <parms>\n");
38 exit(1);
39 }
40 numberFlag = 1;
41 counter = 0;
42 for (i = 1; i < argc; i++) {
2
Loop condition is true. Entering loop body
5
Loop condition is false. Execution continues on line 59
43 if (numberFlag && argv[i][0] == '-') {
3
Taking true branch
44 if (strcmp(argv[i], "-s") == 0)
4
Taking true branch
45 numberFlag = 0;
46 else {
47 printf("bad switch %s\n", argv[i]);
48 exit(1);
49 }
50 } else if (numberFlag) {
51 parms[counter++] = atoi(argv[i]);
52 numberFlag = 1;
53 } else {
54 parms[counter++] = (intptr_t)argv[i];
55 numberFlag = 1;
56 }
57 }
58 code =
59 syscall(AFS_SYSCALL339, parms[0], parms[1], parms[2], parms[3], parms[4],
6
Function call argument is an uninitialized value
60 parms[5]);
61 printf("code %d\n", code);
62 return 0;
63}