The attached patch fixes the following warnings in src/backend/libpq

auth.c:496: warning: passing argument 2 of 'gss_release_cred' from incompatible pointer type pqcomm.c:182: warning: passing argument 2 of 'gss_delete_sec_context' from incompatible pointer type pqcomm.c:185: warning: passing argument 2 of 'gss_release_cred' from incompatible pointer type

Parts of the GSS API want the object while others want pointers to the object and it looks like this code got it backwards. I haven't tested these changes, but they look right to me.

Kris Jurka
? src/backend/libpq/.deps
Index: src/backend/libpq/auth.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/libpq/auth.c,v
retrieving revision 1.155
diff -c -r1.155 auth.c
*** src/backend/libpq/auth.c    24 Jul 2007 09:00:27 -0000      1.155
--- src/backend/libpq/auth.c    5 Sep 2007 09:45:05 -0000
***************
*** 493,499 ****
                /*
                 * Release service principal credentials
                 */
!               gss_release_cred(&min_stat, port->gss->cred);
        }
  
        /*
--- 493,499 ----
                /*
                 * Release service principal credentials
                 */
!               gss_release_cred(&min_stat, &(port->gss->cred));
        }
  
        /*
Index: src/backend/libpq/pqcomm.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/libpq/pqcomm.c,v
retrieving revision 1.195
diff -c -r1.195 pqcomm.c
*** src/backend/libpq/pqcomm.c  24 Jul 2007 11:16:36 -0000      1.195
--- src/backend/libpq/pqcomm.c  5 Sep 2007 09:45:05 -0000
***************
*** 179,188 ****
  
                /* Shutdown GSSAPI layer */
                if (MyProcPort->gss->ctx)
!                       gss_delete_sec_context(&min_s, MyProcPort->gss->ctx, 
NULL);
  
                if (MyProcPort->gss->cred)
!                       gss_release_cred(&min_s, MyProcPort->gss->cred);
  #endif /* ENABLE_GSS */
                /* GSS and SSPI share the port->gss struct */
  
--- 179,188 ----
  
                /* Shutdown GSSAPI layer */
                if (MyProcPort->gss->ctx)
!                       gss_delete_sec_context(&min_s, &(MyProcPort->gss->ctx), 
NULL);
  
                if (MyProcPort->gss->cred)
!                       gss_release_cred(&min_s, &(MyProcPort->gss->cred));
  #endif /* ENABLE_GSS */
                /* GSS and SSPI share the port->gss struct */
  
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to