git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] notes.h: declare bit field as unsigned to silence compiler complaints

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Apr 6, 2010, 15:11 UTC
Message-ID
<pIMfUMS04cynaZmaHBNeBVGGMD789MBMOhj6YUu46YwbNLLHfoeciOmaLmNtocB_WbS14hwuQVI@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>
The IRIX MIPSPro compiler complains like this:
   cc-1107 c99: WARNING File = notes.h, Line = 215
     A signed bit field has a length of 1 bit.
           int suppress_default_notes:1;
               ^
'unsigned' is what was intended, so lets make it so.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 notes.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/notes.h b/notes.h
index ee65bd1..9f59277 100644
--- a/notes.h
+++ b/notes.h
@@ -212,7 +212,7 @@ void format_note(struct notes_tree *t, const unsigned char *object_sha1,
 struct string_list;
 
 struct display_notes_opt {
-	int suppress_default_notes:1;
+	unsigned int suppress_default_notes:1;
 	struct string_list *extra_notes_refs;
 };
 
-- 
1.6.6.2
Message 1 of 1 in “notes.h: declare bit field as unsigned to silence compiler complaints”
  1. notes.h: declare bit field as unsigned to silence compiler complaintsBrandon Casey, Apr 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.