Hi Christoph,
../../binutils-2.17/gas/read.c:1282: warning: 'stopc' may be used uninitialized in this function
Thanks for reporting this. Although it is being a bit pedantic, gcc is technically correct that this variable might be used with an uninitialized value, so I am checking in the attached patch to resolve this problem.
Cheers Nick gas/ChangeLog: 2006-08-29 Nick Clifton <[EMAIL PROTECTED]> * read.c (s_align): Initialize the 'stopc' variable to prevent compiler complaints about it being used without being initialized. (s_comm_internal, s_mri_common, s_fail, s_globl, s_space, s_float_space, s_struct, cons_worker, equals): Likewise.
Index: gas/read.c =================================================================== RCS file: /cvs/src/src/gas/read.c,v retrieving revision 1.120 diff -c -3 -p -r1.120 read.c *** gas/read.c 24 Jul 2006 16:30:55 -0000 1.120 --- gas/read.c 29 Aug 2006 15:13:54 -0000 *************** s_align (int arg, int bytes_p) *** 1282,1288 **** unsigned int align_limit = ALIGN_LIMIT; unsigned int align; char *stop = NULL; ! char stopc; offsetT fill = 0; int max; int fill_p; --- 1282,1288 ---- unsigned int align_limit = ALIGN_LIMIT; unsigned int align; char *stop = NULL; ! char stopc = 0; offsetT fill = 0; int max; int fill_p; *************** s_comm_internal (int param, *** 1426,1432 **** offsetT temp, size; symbolS *symbolP = NULL; char *stop = NULL; ! char stopc; expressionS exp; if (flag_mri) --- 1426,1432 ---- offsetT temp, size; symbolS *symbolP = NULL; char *stop = NULL; ! char stopc = 0; expressionS exp; if (flag_mri) *************** s_mri_common (int small ATTRIBUTE_UNUSED *** 1538,1544 **** symbolS *sym; offsetT align; char *stop = NULL; ! char stopc; if (!flag_mri) { --- 1538,1544 ---- symbolS *sym; offsetT align; char *stop = NULL; ! char stopc = 0; if (!flag_mri) { *************** s_fail (int ignore ATTRIBUTE_UNUSED) *** 1807,1813 **** { offsetT temp; char *stop = NULL; ! char stopc; if (flag_mri) stop = mri_comment_field (&stopc); --- 1807,1813 ---- { offsetT temp; char *stop = NULL; ! char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); *************** s_globl (int ignore ATTRIBUTE_UNUSED) *** 1929,1935 **** int c; symbolS *symbolP; char *stop = NULL; ! char stopc; if (flag_mri) stop = mri_comment_field (&stopc); --- 1929,1935 ---- int c; symbolS *symbolP; char *stop = NULL; ! char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); *************** s_space (int mult) *** 2878,2884 **** expressionS val; char *p = 0; char *stop = NULL; ! char stopc; int bytes; #ifdef md_flush_pending_output --- 2878,2884 ---- expressionS val; char *p = 0; char *stop = NULL; ! char stopc = 0; int bytes; #ifdef md_flush_pending_output *************** s_float_space (int float_type) *** 3054,3060 **** int flen; char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT]; char *stop = NULL; ! char stopc; if (flag_mri) stop = mri_comment_field (&stopc); --- 3054,3060 ---- int flen; char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT]; char *stop = NULL; ! char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); *************** void *** 3131,3137 **** s_struct (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; ! char stopc; if (flag_mri) stop = mri_comment_field (&stopc); --- 3131,3137 ---- s_struct (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; ! char stopc = 0; if (flag_mri) stop = mri_comment_field (&stopc); *************** cons_worker (register int nbytes, /* 1=. *** 3514,3520 **** int c; expressionS exp; char *stop = NULL; ! char stopc; #ifdef md_flush_pending_output md_flush_pending_output (); --- 3514,3520 ---- int c; expressionS exp; char *stop = NULL; ! char stopc = 0; #ifdef md_flush_pending_output md_flush_pending_output (); *************** void *** 5010,5016 **** equals (char *sym_name, int reassign) { char *stop = NULL; ! char stopc; input_line_pointer++; if (*input_line_pointer == '=') --- 5010,5016 ---- equals (char *sym_name, int reassign) { char *stop = NULL; ! char stopc = 0; input_line_pointer++; if (*input_line_pointer == '=')
_______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils