Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4110173

(hpi) sysAvailable on Win32 has a code path that returns without a return stmt

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.1.6, 1.2.0
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_2.5.1, windows_95

      Description

      src/win32/javavm/runtime/sys_api_md.c

      Should return FALSE if fstat fails, or perhaps nonseek available, in case
      fstat returns error for a pipe (as it does on OS/2).

      This error could have been detected by compiling
      with compilation warning for functions not returning a value
      when declared to do so.

      int
      sysAvailable(int fd, long *pbytes) {
          long cur, end;
          struct stat stbuf;

          if (fstat(fd, &stbuf) >= 0) {
             .
             .
             .
          }
      #if defined OS2 /*ibm*/
          return FALSE; /* This would be better */
          return nonSeekAvailable(fd, pbytes); /* or this */
      #endif /*ibm*/
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              apalanissunw Anand Palaniswamy (Inactive)
              Reporter:
              miflemi Mick Fleming (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: