Opened 12 years ago

Closed 11 years ago

#271 closed defect (fixed)

%llX-format (long long) is not supported by Windows' C Runtime

Reported by: ph3-der-loewe Owned by: stephanj
Priority: medium Milestone: RoarAudio major release 1.0
Component: RoarAudio Main Package Version: 1.0beta9
Keywords: Cc: stephanj
Architecture: Compiler: gcc/mingw
Difficulty: Kernel:
Operating System: Windows Parent Tickets:
Patch attached: no Protocol: Gopher
Sound driver: Topic: Porting

Description

emul_gopher.c: In function 'scb_status_txt':
emul_gopher.c:132:10: warning: unknown conversion type character 'l' in format [
-Wformat]
emul_gopher.c:132:10: warning: unknown conversion type character 'l' in format [
-Wformat]
emul_gopher.c:132:10: warning: unknown conversion type character 'l' in format [
-Wformat]
emul_gopher.c:132:10: warning: unknown conversion type character 'l' in format [
-Wformat]
emul_gopher.c:132:10: warning: too many arguments for format [-Wformat-extra-arg
s]
emul_gopher.c: In function '_aprintf':
emul_gopher.c:634:6: warning: variable 'ret' set but not used [-Wunused-but-set-
variable]

Subtickets

Change History (5)

comment:1 Changed 12 years ago by ph3-der-loewe

This seems to be hard to fix. In fact it should be added to system's libc.

comment:2 Changed 12 years ago by ph3-der-loewe

  • Owner set to stephanj
  • Status changed from new to assigned

stephanj,

can you please investigate the situation a bit closer?

  • Is this still true with current versions?
  • Is there an upstream but report?
  • Any additional infos on this out on the inet?
  • Any known workaround/fix?

Test code should be trivial:

 long long int a;
 printf("%lli\n", a);

Compiled with -Wall -Wextra.

comment:3 Changed 12 years ago by stephanj

MSYS/MinGW:

Compile:

$ gcc -Wall -Wextra -o llitest.exe llitest.c
llitest.c: In function 'main':
llitest.c:6:2: warning: unknown conversion type character 'l' in format [-Wforma
t]
llitest.c:6:2: warning: too many arguments for format [-Wformat-extra-args]
llitest.c:7:1: warning: control reaches end of non-void function [-Wreturn-type]

llitest.c:6:8: warning: 'a' is used uninitialized in this function [-Wuninitiali
zed]

Code:

$ cat llitest.c
#include <stdio.h>

int main()
{
        long long int a;
        printf("%lli\n", a);
}

Exec:

$ llitest.exe
8589934612

GCC Version:

$ gcc --version
gcc.exe (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

comment:4 Changed 12 years ago by ph3-der-loewe

Just commited a patch to rpld to fix this within rpld by replacing %llX with %lX. Commitid:2sEur26GIEGbbfkw

comment:5 Changed 11 years ago by ph3-der-loewe

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Version changed from current to 1.0beta9

My patch is to avoid %llX everywhere within the normal code flow. Not updated are ROAR_DBG() debuglions. They may be converted later if needed. I still hope mingw will be fixed.

Note: See TracTickets for help on using tickets.