summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-06-13 16:34:45 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-06-13 16:34:45 +0000
commit26c79e9cecfaf0e122965ca8313290bfd1c27b77 (patch)
treee3eeb90c831961a9f331a736bc58ec03c56ea4c0 /zaptel.c
parentb1211ddf0f4d137ac9b781c7f490985534d79170 (diff)
Rid zaptel of 64-bit compiler warnings
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@407 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/zaptel.c b/zaptel.c
index 6be59c3..1d05fcb 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -435,18 +435,19 @@ static char *sigstr(int sig)
static int zaptel_proc_read(char *page, char **start, off_t off, int count, int *eof, void *data)
{
- int x, span, len = 0;
+ int x, len = 0;
+ long span;
if (off > 0)
return 0;
- (int *)span = data;
+ (long *)span = data;
if (!span)
return 0;
if (spans[span]->name)
- len += sprintf(page + len, "Span %d: %s ", span, spans[span]->name);
+ len += sprintf(page + len, "Span %ld: %s ", span, spans[span]->name);
if (spans[span]->desc)
len += sprintf(page + len, "\"%s\"", spans[span]->desc);
else
@@ -2794,27 +2795,27 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c
spin_unlock_irqrestore(&chans[j]->lock, flags);
printk("Dump of Zaptel Channel %d (%s,%d,%d):\n\n",j,
mychan.name,mychan.channo,mychan.chanpos);
- printk("flags: %x hex, writechunk: %08x, readchunk: %08x\n",
- mychan.flags, (int) mychan.writechunk, (int) mychan.readchunk);
- printk("rxgain: %08x, txgain: %08x, gainalloc: %d\n",
- (int) mychan.rxgain, (int)mychan.txgain, mychan.gainalloc);
- printk("span: %08x, sig: %x hex, sigcap: %x hex\n",
- (int)mychan.span, mychan.sig, mychan.sigcap);
+ printk("flags: %x hex, writechunk: %08lx, readchunk: %08lx\n",
+ mychan.flags, (long) mychan.writechunk, (long) mychan.readchunk);
+ printk("rxgain: %08lx, txgain: %08lx, gainalloc: %d\n",
+ (long) mychan.rxgain, (long)mychan.txgain, mychan.gainalloc);
+ printk("span: %08lx, sig: %x hex, sigcap: %x hex\n",
+ (long)mychan.span, mychan.sig, mychan.sigcap);
printk("inreadbuf: %d, outreadbuf: %d, inwritebuf: %d, outwritebuf: %d\n",
mychan.inreadbuf, mychan.outreadbuf, mychan.inwritebuf, mychan.outwritebuf);
printk("blocksize: %d, numbufs: %d, txbufpolicy: %d, txbufpolicy: %d\n",
mychan.blocksize, mychan.numbufs, mychan.txbufpolicy, mychan.rxbufpolicy);
printk("txdisable: %d, rxdisable: %d, iomask: %d\n",
mychan.txdisable, mychan.rxdisable, mychan.iomask);
- printk("curzone: %08x, tonezone: %d, curtone: %08x, tonep: %d\n",
- (int) mychan.curzone, mychan.tonezone, (int) mychan.curtone, mychan.tonep);
+ printk("curzone: %08lx, tonezone: %d, curtone: %08lx, tonep: %d\n",
+ (long) mychan.curzone, mychan.tonezone, (long) mychan.curtone, mychan.tonep);
printk("digitmode: %d, txdialbuf: %s, dialing: %d, aftdialtimer: %d, cadpos. %d\n",
mychan.digitmode, mychan.txdialbuf, mychan.dialing,
mychan.afterdialingtimer, mychan.cadencepos);
printk("confna: %d, confn: %d, confmode: %d, confmute: %d\n",
mychan.confna, mychan._confn, mychan.confmode, mychan.confmute);
- printk("ec: %08x, echocancel: %d, deflaw: %d, xlaw: %08x\n",
- (int) mychan.ec, mychan.echocancel, mychan.deflaw, (int) mychan.xlaw);
+ printk("ec: %08lx, echocancel: %d, deflaw: %d, xlaw: %08lx\n",
+ (long) mychan.ec, mychan.echocancel, mychan.deflaw, (long) mychan.xlaw);
printk("echostate: %02x, echotimer: %d, echolastupdate: %d\n",
(int) mychan.echostate, mychan.echotimer, mychan.echolastupdate);
printk("itimer: %d, otimer: %d, ringdebtimer: %d\n\n",
@@ -4122,7 +4123,7 @@ int zt_register(struct zt_span *span, int prefmaster)
#ifdef CONFIG_PROC_FS
sprintf(tempfile, "zaptel/%d", span->spanno);
- proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444, NULL , zaptel_proc_read, (int *)span->spanno);
+ proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444, NULL , zaptel_proc_read, (int *)(long)span->spanno);
#endif
#ifdef CONFIG_DEVFS_FS