On Thursday, August 24, 2006 11:26:29 AM -0400 Derek Atkins <[EMAIL PROTECTED]> wrote:

Jim Rees <[EMAIL PROTECTED]> writes:

[snip]
@@ -478,6 +478,7 @@
     f_print(fout, "#ifndef        SOCK_DGRAM  /* XXXXX */\n");
     f_print(fout, "#include \"h/socket.h\"\n");
     f_print(fout, "#endif\n");
+    f_print(fout, "struct ubik_client;\n");
     f_print(fout, "#ifndef        DTYPE_SOCKET  /* XXXXX */\n");
     f_print(fout, "#ifndef AFS_LINUX22_ENV\n");
     f_print(fout, "#include \"h/file.h\"\n");

I think this patch is 100% safe, and I don't see anything wrong with
it, except for the fact that it might be "nicer" if we #included
the proper file.   But I'm not a gatekeeper, so what I say means
very little.

That patch is fine. It gets a declaration into global scope, which will make the warning go away and allow pointers to that type to be declared. It doesn't provide a definition, which means it won't interfere with the real definition if that happens to be visible (regardless of the order in which they occur), and won't mask problems with things that attempt to allocate storage for or access members of variables of that type without having the real definition in scope.

-- Jeff
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to