[ros-diffs] [cwittich] 38602: -Vincent Povirk <madewokherd+d41d at gmail.com> Thu Dec 4 2008 widl: Fix string format warning. -Andrew Talbot <andrew.talbot at talbotville.com> Sat Dec 6 2008 widl: Remove unneeded address-of operators from array names.

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Jan 6 08:20:00 CET 2009


Author: cwittich
Date: Tue Jan  6 01:19:59 2009
New Revision: 38602

URL: http://svn.reactos.org/svn/reactos?rev=38602&view=rev
Log:
-Vincent Povirk <madewokherd+d41d at gmail.com> Thu Dec 4 2008
widl: Fix string format warning.

-Andrew Talbot <andrew.talbot at talbotville.com> Sat Dec 6 2008
widl: Remove unneeded address-of operators from array names.

Modified:
    trunk/reactos/tools/widl/proxy.c
    trunk/reactos/tools/widl/utils.c
    trunk/reactos/tools/widl/utils.h

Modified: trunk/reactos/tools/widl/proxy.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/proxy.c?rev=38602&r1=38601&r2=38602&view=diff
==============================================================================
--- trunk/reactos/tools/widl/proxy.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/proxy.c [iso-8859-1] Tue Jan  6 01:19:59 2009
@@ -744,11 +744,11 @@
 
   fprintf(proxy, "const ExtendedProxyFileInfo %s_ProxyFileInfo =\n", file_id);
   fprintf(proxy, "{\n");
-  fprintf(proxy, "    (const PCInterfaceProxyVtblList*)&_%s_ProxyVtblList,\n", file_id);
-  fprintf(proxy, "    (const PCInterfaceStubVtblList*)&_%s_StubVtblList,\n", file_id);
+  fprintf(proxy, "    (const PCInterfaceProxyVtblList*)_%s_ProxyVtblList,\n", file_id);
+  fprintf(proxy, "    (const PCInterfaceStubVtblList*)_%s_StubVtblList,\n", file_id);
   fprintf(proxy, "    _%s_InterfaceNamesList,\n", file_id);
   fprintf(proxy, "    0,\n");
-  fprintf(proxy, "    &_%s_IID_Lookup,\n", file_id);
+  fprintf(proxy, "    _%s_IID_Lookup,\n", file_id);
   fprintf(proxy, "    %d,\n", c);
   fprintf(proxy, "    1,\n");
   fprintf(proxy, "    0,\n");

Modified: trunk/reactos/tools/widl/utils.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/utils.c?rev=38602&r1=38601&r2=38602&view=diff
==============================================================================
--- trunk/reactos/tools/widl/utils.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/utils.c [iso-8859-1] Tue Jan  6 01:19:59 2009
@@ -66,26 +66,20 @@
 }
 
 
+void error_loc(const char *s, ...)
+{
+	loc_info_t cur_loc = CURRENT_LOCATION;
+	va_list ap;
+	va_start(ap, s);
+	generic_msg(&cur_loc, s, "Error", ap);
+	va_end(ap);
+	exit(1);
+}
+
 /* yyerror:  yacc assumes this is not newline terminated.  */
-void parser_error(const char *s, ...)
-{
-	loc_info_t cur_location = CURRENT_LOCATION;
-	va_list ap;
-	va_start(ap, s);
-	generic_msg(&cur_location, s, "Error", ap);
-	fprintf(stderr, "\n");
-	va_end(ap);
-	exit(1);
-}
-
-void error_loc(const char *s, ...)
-{
-	loc_info_t cur_loc = CURRENT_LOCATION;
-	va_list ap;
-	va_start(ap, s);
-	generic_msg(&cur_loc, s, "Error", ap);
-	va_end(ap);
-	exit(1);
+void parser_error(const char *s)
+{
+	error_loc("%s\n", s);
 }
 
 void error_loc_info(const loc_info_t *loc_info, const char *s, ...)

Modified: trunk/reactos/tools/widl/utils.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/utils.h?rev=38602&r1=38601&r2=38602&view=diff
==============================================================================
--- trunk/reactos/tools/widl/utils.h [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/utils.h [iso-8859-1] Tue Jan  6 01:19:59 2009
@@ -33,7 +33,7 @@
 #define __attribute__(X)
 #endif
 
-void parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
+void parser_error(const char *s) __attribute__((noreturn));
 int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
 void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));
 void error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn));



More information about the Ros-diffs mailing list