Bug 150298 - 2 * broken code + unrecognized character escape sequence
Summary: 2 * broken code + unrecognized character escape sequence
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: tla
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Shahms E. King
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-04 14:30 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-16 17:23:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-03-04 14:30:16 UTC
Description of problem:

I just tried to compile tla-1.3-1 from 
Redhat Fedora Extras development tree with the Intel C compiler.

The compiler said

1.

/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(325): remark
#592: variable "a" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(325): remark
#592: variable "a_l" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(325): remark
#592: variable "b" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(325): remark
#592: variable "b_l" is used before its value is set

The source code is

int
dstr_cmp (t_dstr ad, t_dstr bd)
{
  t_uchar * a;
  size_t a_l;
  t_uchar * b;
  size_t b_l;

  return str_cmp_n (a, a_l, b, b_l);
}

This looks like very wrong code. Is it work in progress ?

2.

/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(344): remark
#592: variable "a" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(344): remark
#592: variable "a_l" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(344): remark
#592: variable "b" is used before its value is set
/usr/src/redhat/BUILD/tla-1.3/src/hackerlab/char/dstr.c(344): remark
#592: variable "b_l" is used before its value is set

Duplicate.

3.
/usr/src/redhat/BUILD/tla-1.3/src/tla/libarch/merge-points.c(108):
warning #192: unrecognized character escape sequence

The source code is

              safe_printfmt (2, "arch: attempt to compute merge-points
of non-existent revision\n  (%s\%s)\n", into_arch->name, into_spec);

\% is a valid specifier. Was %%%s intended ?



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Shahms E. King 2005-03-29 21:50:31 UTC
1 and 2 definitely look . . . bad.  I'll send those upstream.  But number 3 is
not a bug (as there are 2 '%s' escapes and two strings).

Before going any furthur, could you try recompiling tla-1.3.1-4.fix.1 SRPM from
the devel repository?  There are some other issues in 1.3.1 at present, but
yours might be fixed.

Comment 2 David Binderman 2005-03-30 09:44:01 UTC
>But number 3 is not a bug (as there are 2 '%s' escapes and two strings).

I'm sorry, I wrote the wrong thing. What I should have said was
that the escape sequence \% isn't a valid escape sequence.

I've just checked K&R 2, and page 38 in my copy says it isn't either.

Suggest rework, but I am unable to suggest a replacement, since I
don't know what is required here.

>could you try recompiling tla-1.3.1-4.fix.1 SRPM from
>the devel repository?

Sorry, no. That machine no longer runs Redhat Linux.

I suggest that using gcc compiler flag -Wall might get you what you want.
 


Comment 3 Shahms E. King 2006-02-16 17:23:44 UTC
problems 1 and 2 have been fixed and 3 doesn't cause any errors and pretty much
isn't going to be fixed upstream, so I'm closing as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.